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

Discuss how to download pictures from websites using PicaLoader.
(NO adult contents and advertisement please.)
Post Reply
picdan
Posts: 2
Joined: Fri Mar 21, 2008 9:39 am

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

Post 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!
User avatar
KoalaBear
Posts: 325
Joined: Wed Sep 24, 2003 5:27 pm

Post 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.
Attachments
moni.jpg
moni.jpg (107.23 KiB) Viewed 490 times
moni.plt
save to your disk then select menu-&gt;Task-&gt;Import Task(s) to import to your project.
(9.93 KiB) Downloaded 36 times
picdan
Posts: 2
Joined: Fri Mar 21, 2008 9:39 am

Post by picdan »

Thanks very much! I'll try that out.

[update] Tried it, works great, thanks again!
merc_slk
Posts: 17
Joined: Sat Jan 26, 2008 4:34 pm

This may help some more.

Post 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.
Post Reply