Hi,
I am trying to download all image URLs (large size) that appear on a product page on an e-commerce website. Please see attachment to understand.
The way I have set it up currently, only the main "thumbnail" image URL gets downloaded and not the entire set of image URLs that are available on the page. Could you help me with downloading all expanded image URLs?
Thanks,
Saahil
Download Multiple Images
-
- Posts: 8
- Joined: Wed May 09, 2012 9:04 am
Download Multiple Images
- Attachments
-
- junglee-full-data-within-india.zip
- (82.46 KiB) Downloaded 591 times
Re: Download Multiple Images
Hi,
I couldn't find any product with more than one picture. If you send me one or two sample URLs I could give you an specific example. Anyhow, typically, the src attribute of the thumb is just a variation of the large version (you can see the src attribute of any image by clicking on the Choose visible properties button in the selection panel, then selecting the SrcAttribute property and then selecting the picture with selection mode on and looking under the SrcAttribute column in the selection panel). For instance, if the path to the thumb version would be something like "http://www.example.com/images/some_pic_thumb.jpg", the path to the large picture would be something like "http://www.example.com/images/some_pic_full.jpg". If this would be the case, you'd just create a JavaScript gatherer with this code:
All this does is replace "_thumb" for "_full" in the src attribute. If you'd name this gatherer FullSrc, in your Extract action you'd then extract and download the FullSrc property of your image instead of the SrcAttribute property.
I couldn't find any product with more than one picture. If you send me one or two sample URLs I could give you an specific example. Anyhow, typically, the src attribute of the thumb is just a variation of the large version (you can see the src attribute of any image by clicking on the Choose visible properties button in the selection panel, then selecting the SrcAttribute property and then selecting the picture with selection mode on and looking under the SrcAttribute column in the selection panel). For instance, if the path to the thumb version would be something like "http://www.example.com/images/some_pic_thumb.jpg", the path to the large picture would be something like "http://www.example.com/images/some_pic_full.jpg". If this would be the case, you'd just create a JavaScript gatherer with this code:
Code: Select all
return element.src.replace('_thumb', '_full');
Juan Soldi
The Helium Scraper Team
The Helium Scraper Team