Page 1 of 1

Download Multiple Images

Posted: Tue Jun 26, 2012 10:11 am
by saahilgoel
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

Re: Download Multiple Images

Posted: Tue Jul 03, 2012 1:50 am
by webmaster
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:

Code: Select all

return element.src.replace('_thumb', '_full');
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.