Download multi images

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Download multi images

by petard001 on Tue Sep 26, 2017 1:14 pm

Hi, a long time I haven't come here.
Sorry for my english, my native language is french.
VERSION BUILD=9030808 RECORDER=FX, Firefox, Windows 10
I try to download all the image from http://www.tenboome.webruimtehosting.net/guldenboek/1933-1934/index.htm
The URl of the images are like this :
http://www.tenboome.webruimtehosting.net/guldenboek/1933-1934/P006%202e%20linie.JPG
http://www.tenboome.webruimtehosting.net/guldenboek/1933-1934/P007%202e%20linie.JPG
etc...
Is this somebody who can help me ?
Last edited by petard001 on Wed Sep 27, 2017 12:54 am, edited 1 time in total.
petard001
 
Posts: 36
Joined: Fri Mar 19, 2010 1:04 am

Re: Download multi images

by chivracq on Tue Sep 26, 2017 2:32 pm

petard001 wrote:Hi, a long time I haven't come here.
Sorry for my english, my native language is french.

Code: Select all
VERSION BUILD=9030808 RECORDER=FX, Firefox, Windows 10


I try to download all the image from http://www.tenboome.webruimtehosting.net/guldenboek/1933-1934/index.htm
The URl of the images are like this :
http://www.tenboome.webruimtehosting.net/guldenboek/1933-1934/P006%202e%20linie.JPG
http://www.tenboome.webruimtehosting.net/guldenboek/1933-1934/P007%202e%20linie.JPG
etc...
Is this somebody who can help me ?

Yep, doesn't look very complicated from a quick look...

But "FCIM" (read my Sig...) for me to have a (deeper) look..., => your FF Version is missing... :mrgreen:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6481
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Download multi images

by petard001 on Tue Sep 26, 2017 10:14 pm

Hello Chivracq,
"FICM" : VERSION BUILD=9030808 RECORDER=FX, Firefox 55.0.3 (32 bits), Windows 10
Thanks in advance.
Bonne journée.
Alain Evrard
petard001
 
Posts: 36
Joined: Fri Mar 19, 2010 1:04 am

Re: Download multi images

by chivracq on Wed Sep 27, 2017 3:22 am

petard001 wrote:Hello Chivracq,
"FICM" :
Code: Select all
VERSION BUILD=9030808 RECORDER=FX, Firefox 55.0.3 (32 bits), Windows 10

Thanks in advance.
Bonne journée.
Alain Evrard

OK, (still) on FF55, good... (Some User already on FF56 reported yesterday some Pb's...)

OK, not very complicated Task I said, and a perfect Usecase for iMacros actually...
There are several different Approaches possible, nearly too many to choose actually, but OK, I would go for the following (easy) one...:
If you open a Photo in a New Tab from the Horizontal Photo Gallery on/from the '/guldenboek/1933-1934/index.htm' Page, you will notice that it has its own unique URL starting at Index=0 for the first Photo and incrementing 1 by 1 for each Photo until Index=453 for the last one in the following Format:
Code: Select all
'/guldenboek/1933-1934/Data/page.htm?0,0'
'/guldenboek/1933-1934/Data/page.htm?1,0'
'/guldenboek/1933-1934/Data/page.htm?2,0'
...
'/guldenboek/1933-1934/Data/page.htm?453,0'

=> You simply need to compute that [0-453] part based on '!LOOP' for the Incrementation and loop your Script 454 times...

This would give stg like...:
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
TAB T=1

SET !LOOP 1
SET Photo_Index -1
ADD Photo_Index {{!LOOP}}

'URL GOTO=http://www.tenboome.webruimtehosting.net/guldenboek/1933-1934/Data/page.htm?451,0
URL GOTO=http://www.tenboome.webruimtehosting.net/guldenboek/1933-1934/Data/page.htm?{{Photo_Index}},0

TAG POS=1 TYPE=H1 ATTR=TXT:Guldenboek<SP>der<SP>Vuurkaart
TAG POS=1 TYPE=SPAN ATTR=TXT:1933-1934

'TAG POS=1 TYPE=IMG ATTR=SRC:http://www.tenboome.webruimtehosting.net/guldenboek/1933-1934/P609%20kolonialetroepen.JPG
TAG POS=R1 TYPE=IMG ATTR=SRC:http://www.tenboome.webruimtehosting.net/guldenboek/1933-1934/*.jpg CONTENT=EVENT:SAVEITEM
WAIT SECONDS=0.5
(Tested on iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10_x64.)

Hum..., interesting to notice that the Photos are saved with their original Date from June 2006, Date when they were shot obviously... (I couldn't find them in my 'Downloads' Folder as I was sorting the Content of that Folder on "Date", ah-ah...!)

You can use the 'ONDOWNLOAD' Command if you want to control the Location where they get saved (per Default in the iMacros 'Downloads' Folder), and if you want to "clean" a bit their Name (with 'EVAL()') to remove all those ugly "%20" instead of Spaces...

The mini-'WAIT' Statement is probably not needed, I ran my Test on the first 10 Photos without it and it went fine but the Looping goes so quickly that it looks nearly a bit freaky and iMacros or the OS might need a bit of time after a while to process all those Downloads..., even if 'SAVEITEM' doesn't re-download the Photos but lets the OS copy them directly from the Browser Cache.
Last edited by chivracq on Wed Sep 27, 2017 9:25 am, edited 1 time in total.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6481
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Download multi images

by petard001 on Wed Sep 27, 2017 9:01 am

Grand merci, Chivracq
petard001
 
Posts: 36
Joined: Fri Mar 19, 2010 1:04 am

Re: Download multi images

by chivracq on Wed Sep 27, 2017 9:42 am

petard001 wrote:Grand merci, Chivracq

OK..., but did you check if it works...?

My Browser (Pale Moon) is tuned for "Speed" and Reliability, and my OS as well of course, but my Internet Connection is often rather slow, especially during the day (as I "surf" on the Co. from some Neighbours/Friends and the Co. slows down drastically for me usually as soon as sbd there is home and on Internet) and I use a different iMacros Version than you (v9.0.3 is pretty buggy and limited btw, compared to v8.9.7 for example, which still works on FF v55.0.3), so you might need to check that the Script works fine and reliably for you as well, or you might need to tune it a bit to slow it down with the different '!TIMEOUT_xxx' Settings and some extra mini-'WAIT' Statements...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6481
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Download multi images

by petard001 on Tue Oct 17, 2017 7:46 am

chivracq wrote:
petard001 wrote:Grand merci, Chivracq

OK..., but did you check if it works...?

My Browser (Pale Moon) is tuned for "Speed" and Reliability, and my OS as well of course, but my Internet Connection is often rather slow, especially during the day (as I "surf" on the Co. from some Neighbours/Friends and the Co. slows down drastically for me usually as soon as sbd there is home and on Internet) and I use a different iMacros Version than you (v9.0.3 is pretty buggy and limited btw, compared to v8.9.7 for example, which still works on FF v55.0.3), so you might need to check that the Script works fine and reliably for you as well, or you might need to tune it a bit to slow it down with the different '!TIMEOUT_xxx' Settings and some extra mini-'WAIT' Statements...

Sorry for the "retard"...
Everything works fine !
Thanks
petard001
 
Posts: 36
Joined: Fri Mar 19, 2010 1:04 am


Return to iMacros for Firefox

Who is online

Users browsing this forum: Bing [Bot] and 10 guests

-->