Several images download from URL

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Jandi Lee
Posts: 5
Joined: Wed Jan 16, 2019 6:44 am

Several images download from URL

Post by Jandi Lee » Wed Nov 06, 2019 3:35 pm

IMACROS VERSION BUILD=12.5.2018.1105
OS : WINDOWS 10 PRO 64BIT
BROWSER : IE 11


Hello.
Always thanks too much for your kind help and support.

I'd like to download 5 images in below URL and I used below tag.
First image download is successful, but from 2nd image download is not working.
How can I download several images?
Awaiting your answer.

Best regards
Jandi

My TAG
------------------------------------------------------------------------
VERSION BUILD=12.5.2018.1105
TAB T=1
TAB CLOSEALLOTHERS

URL GOTO=https://www.ikea.com/kr/ko/catalog/products/20391470/
TAG POS=1 TYPE=IMG ATTR=HREF:https:*S5.JPG
ONDOWNLOAD FOLDER=D: FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}
TAG POS=1 TYPE=IMG ATTR=HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM

TAG POS=2 TYPE=IMG ATTR=HREF:https:*S5.JPG
ONDOWNLOAD FOLDER=D: FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}
TAG POS=2 TYPE=IMG ATTR=HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM

TAG POS=3 TYPE=IMG ATTR=HREF:https:*S5.JPG
ONDOWNLOAD FOLDER=D: FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}
TAG POS=3 TYPE=IMG ATTR=HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM

TAG POS=4 TYPE=IMG ATTR=HREF:https:*S5.JPG
ONDOWNLOAD FOLDER=D: FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}
TAG POS=4 TYPE=IMG ATTR=HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM

TAG POS=5 TYPE=IMG ATTR=HREF:https:*S5.JPG
ONDOWNLOAD FOLDER=D: FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}
TAG POS=5 TYPE=IMG ATTR=HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM
------------------------------------------------------------------------


URL and (part of) HTML
I want to download below 5 picutres. (*S5.JPG)
------------------------------------------------------------------------
https://www.ikea.com/kr/ko/catalog/products/20391470/
...
<img id=""zoomPopupImg0"" class=""productImgSlideshow __web-inspector-hide-shortcut__"" src=""/kr/ko/images/products/lumsas-lumsoseu-danmoleogeu-geulei__0621685_PE690048_S5.JPG"" title="""">
...
<img id=""zoomPopupImg1"" class=""productImgSlideshow"" src=""/kr/ko/images/products/lumsas-lumsoseu-danmoleogeu-geulei__0621682_PE690047_S5.JPG"" title="""">
...
<img id=""zoomPopupImg2"" class=""productImgSlideshow"" src=""/kr/ko/images/products/lumsas-lumsoseu-danmoleogeu-geulei__0621684_PE690049_S5.JPG"" title="""">
...
<img id=""zoomPopupImg3"" class=""productImgSlideshow"" src=""/kr/ko/images/products/lumsas-lumsoseu-danmoleogeu-geulei__0621683_PE690050_S5.JPG"" title="""">
...
<img id=""zoomPopupImg4"" class=""productImgSlideshow"" src=""/kr/ko/images/products/lumsas-lumsoseu-danmoleogeu-geulei__0622008_PE690237_S5.JPG"" title="""">
...
------------------------------------------------------------------------
chivracq
Posts: 9425
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Several images download from URL

Post by chivracq » Wed Nov 06, 2019 6:25 pm

Jandi Lee wrote:
Wed Nov 06, 2019 3:35 pm

Code: Select all

IMACROS VERSION BUILD=12.5.2018.1105
OS : WINDOWS 10 PRO 64BIT
BROWSER : IE 11

Hello.
Always thanks too much for your kind help and support.

I'd like to download 5 images in below URL and I used below tag.
First image download is successful, but from 2nd image download is not working.
How can I download several images?
Awaiting your answer.

Best regards
Jandi

My TAG
------------------------------------------------------------------------

Code: Select all

VERSION BUILD=12.5.2018.1105
TAB T=1
TAB CLOSEALLOTHERS

URL GOTO=https://www.ikea.com/kr/ko/catalog/products/20391470/
TAG POS=1 TYPE=IMG ATTR=HREF:https:*S5.JPG
ONDOWNLOAD FOLDER=D: FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}  
TAG POS=1 TYPE=IMG ATTR=HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM

TAG POS=2 TYPE=IMG ATTR=HREF:https:*S5.JPG
ONDOWNLOAD FOLDER=D: FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}  
TAG POS=2 TYPE=IMG ATTR=HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM

TAG POS=3 TYPE=IMG ATTR=HREF:https:*S5.JPG
ONDOWNLOAD FOLDER=D: FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}  
TAG POS=3 TYPE=IMG ATTR=HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM

TAG POS=4 TYPE=IMG ATTR=HREF:https:*S5.JPG
ONDOWNLOAD FOLDER=D: FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}  
TAG POS=4 TYPE=IMG ATTR=HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM

TAG POS=5 TYPE=IMG ATTR=HREF:https:*S5.JPG
ONDOWNLOAD FOLDER=D: FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}  
TAG POS=5 TYPE=IMG ATTR=HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM
------------------------------------------------------------------------


URL and (part of) HTML
I want to download below 5 picutres. (*S5.JPG)
------------------------------------------------------------------------
https://www.ikea.com/kr/ko/catalog/products/20391470/

Code: Select all

...
<img id=""zoomPopupImg0"" class=""productImgSlideshow __web-inspector-hide-shortcut__"" src=""/kr/ko/images/products/lumsas-lumsoseu-danmoleogeu-geulei__0621685_PE690048_S5.JPG"" title="""">
...
<img id=""zoomPopupImg1"" class=""productImgSlideshow"" src=""/kr/ko/images/products/lumsas-lumsoseu-danmoleogeu-geulei__0621682_PE690047_S5.JPG"" title="""">
...
<img id=""zoomPopupImg2"" class=""productImgSlideshow"" src=""/kr/ko/images/products/lumsas-lumsoseu-danmoleogeu-geulei__0621684_PE690049_S5.JPG"" title="""">
...
<img id=""zoomPopupImg3"" class=""productImgSlideshow"" src=""/kr/ko/images/products/lumsas-lumsoseu-danmoleogeu-geulei__0621683_PE690050_S5.JPG"" title="""">
...
<img id=""zoomPopupImg4"" class=""productImgSlideshow"" src=""/kr/ko/images/products/lumsas-lumsoseu-danmoleogeu-geulei__0622008_PE690237_S5.JPG"" title="""">
...
------------------------------------------------------------------------

OK, I had a look at your Script and Site and did a bit of Testing... 8)

You are a "little bit lucky", because I only realized afterwards that your 2 previous Threads were never finished "completely correctly" and that you didn't follow up (anymore), after myself + TechSup + some other Advanced User did some Testing for you and posted in those 2 Threads...
=> Would be "nice" if you could finish those 2 previous Threads "a bit correctly"...! :idea:

>>>

Here is the Script I used, and that manages to download the 5 Images that you want, if I'm correct:

Code: Select all

VERSION BUILD=8820413 RECORDER=FX
TAB T=1

'URL GOTO=https://www.ikea.com/kr/ko/catalog/products/20391470/

SET WAIT_Temp 0.5
SET DL_Folder "D:\\TEMP\\iMacros\\Temp\\_Forum Cases\\Jandi Lee"

TAG POS=1 TYPE=IMG ATTR=ID:imgID_*
WAIT SECONDS={{WAIT_Temp}}
ONDOWNLOAD FOLDER={{DL_Folder}} FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}
TAG POS=1 TYPE=IMG ATTR=ID:zoomPopupImg*&&HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM
WAIT SECONDS={{WAIT_Temp}}

TAG POS=2 TYPE=IMG ATTR=ID:imgID_*
WAIT SECONDS={{WAIT_Temp}}
ONDOWNLOAD FOLDER={{DL_Folder}} FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}
TAG POS=2 TYPE=IMG ATTR=ID:zoomPopupImg*&&HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM
WAIT SECONDS={{WAIT_Temp}}

TAG POS=3 TYPE=IMG ATTR=ID:imgID_*
WAIT SECONDS={{WAIT_Temp}}
ONDOWNLOAD FOLDER={{DL_Folder}} FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}
TAG POS=3 TYPE=IMG ATTR=ID:zoomPopupImg*&&HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM
WAIT SECONDS={{WAIT_Temp}}

TAG POS=4 TYPE=IMG ATTR=ID:imgID_*
WAIT SECONDS={{WAIT_Temp}}
ONDOWNLOAD FOLDER={{DL_Folder}} FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}
TAG POS=4 TYPE=IMG ATTR=ID:zoomPopupImg*&&HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM
WAIT SECONDS={{WAIT_Temp}}

TAG POS=5 TYPE=IMG ATTR=ID:imgID_*
WAIT SECONDS={{WAIT_Temp}}
ONDOWNLOAD FOLDER={{DL_Folder}} FILE=+_image_{{!NOW:yyyymmdd_hhnnss}}
TAG POS=5 TYPE=IMG ATTR=ID:zoomPopupImg*&&HREF:https:*S5.JPG CONTENT=EVENT:SAVEITEM
WAIT SECONDS={{WAIT_Temp}}
=> This will download the following 5 Images:
Index of file:///D://TEMP//iMacros//Temp//_Forum Cases//Jandi Lee/

Up to higher level directory
Name Size Last Modified
File:lumsas-lumsoseu-danmoleogeu-geulei__0622008_PE690237_…​image_20191106_185950.JPG 728 KB 06/11/2019 18:59:51
File:lumsas-lumsoseu-danmoleogeu-geulei__0621683_PE690050_…​image_20191106_185949.JPG 596 KB 06/11/2019 18:59:49
File:lumsas-lumsoseu-danmoleogeu-geulei__0621684_PE690049_…​image_20191106_185948.JPG 849 KB 06/11/2019 18:59:48
File:lumsas-lumsoseu-danmoleogeu-geulei__0621682_PE690047_…​image_20191106_185947.JPG 786 KB 06/11/2019 18:59:47
File:lumsas-lumsoseu-danmoleogeu-geulei__0621685_PE690048_…​image_20191106_185945.JPG 1187 KB 06/11/2019 18:59:45
(Tested on iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10_x64.)

And you can adapt the Vars I used to your own Env., or re-hard-code them in your Script if you prefer...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply