tducret / amazon-scraper-python

Non-official client to get some info about products sold on Amazon
MIT License
871 stars 159 forks source link

Images #10

Closed DiReKToRje closed 5 years ago

DiReKToRje commented 5 years ago

Would be awesome if we could get images of a product (link to an image) into the CSV file. If possible all of them (could be in the same field in CSV, just separated with a delimiter or something?), or at least the first (main) image link.

EDIT: I took a look at it a bit more and you could get (all) the thumbnail photos from the side and just change the url afterwards to get the full size image. For example, this item (https://www.amazon.com/gp/product/B0040EGNIU?pf_rd_p=1581d9f4-062f-453c-b69e-0f3e00ba2652&pf_rd_r=SB6K7AFYBC9WW0PTX71F), first thumbnail image has a link (https://images-na.ssl-images-amazon.com/images/I/41%2B1lH%2BGP0L._SS40_.jpg), if we change the SS40 to SX522 we get a full sized image (https://images-na.ssl-images-amazon.com/images/I/41%2B1lH%2BGP0L._SX522_.jpg)

Thumbnail links can be found like this: $("div#altImages ul li.item.imageThumbnail img"). Hope I helped a bit. Thanks!

EDIT 2: Just found out that we can change the link to SL1500, which gives us an even better picture. Maybe even implement a way to choose which resolution we want, although we can do this by changing links ourselves later too. Thanks again!

bitofbreeze commented 5 years ago

Addressed this in https://github.com/tducret/amazon-scraper-python/pull/16

DiReKToRje commented 5 years ago

Thanks mate, was just looking at this earlier today as I will be using it in the near future. Have a nice one! Cheers!

DiReKToRje commented 5 years ago

Implemented and working as intended. Thanks, guys!