Page 1 of 1

Sequential Image DL'ing: how do I repeat a variable?

Posted: Fri Mar 21, 2008 9:55 am
by picdan
Hi there! Quick question. I am looking to grab the images in this sequence (NSFW)

http://www.monitor.hr/belle/0404/040401.jpg

Note that the directory name (in this case "0404") is also repeated in the filenames it contains. The range goes from 0001-0799 (approximately)

I considered entering the URL like this:
http://www.monitor.hr/belle/[0001-0799]/[0001-0799]01.jpg

However it would need to search about 640,000 URLS, which is really inefficient.

What would be the easiest way to have PicaLoader repeat the variable?

Also, if anyone has a link to a tutorial for general scripting that might help me next time, I'd love to learn more. Thank you!

Posted: Fri Mar 21, 2008 12:11 pm
by KoalaBear
Start URL:http://www.monitor.hr
Check Search sequence pictures
HTML Parser Script:

if (HTML.Level==0) then
local i=1;
while i<9 do
local j=1;
while j<15 do
local url=string.format('http://www.monitor.hr/belle/%02d%02d/%02d%02d01.jpg',i,j,i,j);
AddLink(url,HTML.Url,HTML.Title,'',HTML.TaskID,0);
j=j+1;
end;
i=i+1;
end;
end;


That's all. you can adjust 15 in while j<15 do to a number less than 99, maybe you can get more pics.

Posted: Fri Mar 21, 2008 6:37 pm
by picdan
Thanks very much! I'll try that out.

[update] Tried it, works great, thanks again!

This may help some more.

Posted: Mon Mar 24, 2008 12:28 pm
by merc_slk
The pictures have a main ref like year month and a sub ref like year month day number.

so http://www.monitor.hr/belle/0702/070228.htm means :

belle / 07(year)02(month)/07(year)02(month)xx(day).jpg

Y=97 to 08 in 97 the month starts with 03
M=01 to 12
D=01 to 31 max

Maybe this will help to rewrite the script.