Documentation
¶
Index ¶
- func GetImg(imgURL string, proxyURL *url.URL) (string, []byte, error)
- func GetMainURLs(countryCode, currency string, proxyURL *url.URL, tries int) ([]string, int, error)
- func ParseBodyMainList(body []byte) ([]string, error)
- func ParseProxy(urlToParse, userName, password string) (*url.URL, error)
- func RemoveSpace(value string) string
- func Test()
- func TestWithProxy()
- type Asin
- type Client
- type Combination
- type Data
- type IconPanel
- type Imgs
- type ImgsPage
- type Label
- type LabelValue
- type LabelValues
- type MainPanelDesciptions
- type Price
- type URLImg
- type Variations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMainURLs ¶
func ParseBodyMainList ¶
func RemoveSpace ¶
func TestWithProxy ¶
func TestWithProxy()
Types ¶
type Client ¶
type Client struct {
CountryCode string //ISO country code, example: USD, MX
Currency string //ISO currency, example: USD, EUR
ProxyURL *url.URL
Tries int
}
func DefaulClient ¶
func DefaulClient() Client
func (Client) GetFromURL ¶
make sure your url contains "?th=1&psc=1" for better results, sometimes if you don't add it it won't show the price it will return the data along with how many tries did for extracting the data
type Combination ¶
type Data ¶
type Data struct {
Asin Asin
URL string
Title string
MerchandID string
Rating float32
Available bool
Price Price
ShippingAddress string
Variations Variations
MainPanelDesc MainPanelDesciptions
Images []Imgs
}
func GetFromURL ¶
func GetFromURL(productURL, countryCode, currency string, proxyURL *url.URL, tries int) (Data, int, error)
GetFromURL gets the information with the product url //the code is optimize to work on this format: https://www.amazon.com/[label]/dp/[id]?th=1&psc=1 proxyURL is the proxy you would like to use, its recommended to use residential proxies countryCode, set to any country code, this will change the end result, probably the pricing or if available or not -->>>iF COUNTRY CODE IS NOT PRESENT AMAZON WILL CONSIDER THE IP LOCATION <----- tries is how many tries you want to make before throwing an error, this is usefull because sometimes amazom will require a captcha make soure your url contains "?th=1&psc=1" for better results, sometimes if you don't add it it wont' show the price it will return the data along with how many tries did for extracting the data
func ParseBodyDetails ¶
type LabelValue ¶
type LabelValues ¶
type MainPanelDesciptions ¶
type MainPanelDesciptions struct {
Details []LabelValue
AboutThis []string
IconsPanel []IconPanel
}
type Variations ¶
type Variations struct {
Labels []LabelValues
Combinations []Combination
}