Hello,
I want to download the large pictures from http://www.cazar.de
But al those are embedded in a javascript called zoomwin, see example :
function zoomWin(Title,Poster)
{
myWin = window.open("", "", "width=0,height=0,scrollbars");
myWin.moveTo(0,0);
myWin.resizeTo(screen.availWidth,screen.availHeight);
myWin.document.writeln("<html>");
myWin.document.writeln("<title>CAZAR</title>");
myWin.document.writeln("<head>");
myWin.document.writeln("</head>");
myWin.document.writeln("<body bgcolor='#000000'>");
myWin.document.writeln("<center>");
myWin.document.writeln("<a href='javascript:self.close()'><font size='+1' color='#FFFFFF' face='Verdana'>Fenster schliessen</font></a><br>");
myWin.document.writeln("<br>");
myWin.document.writeln("<table cellspacing=0 cellpadding=0 border=0><td align=center width=300 height=50>");
myWin.document.writeln("<a href='javascript:self.close()'><img src=\"" + Poster + "\" hspace=0 vspace=0 border=0></a>");
myWin.document.writeln("<br><font size='+1' color='#FFFFFF' face='Verdana'>" + Title + "</font><br><font size='-1' color='#FFFFFF' face='Verdana'>© Copyright CAZAR.DE</font>");
myWin.document.writeln("</td></table>");
myWin.document.writeln("</center>");
myWin.document.writeln("</body>");
myWin.document.writeln("</html>");
myWin.focus();
}
The function is called like this :
<a href="javascript:zoomWin('Andres Sarda - Nice - BH','http://www.cazar.de/shop/out/oxbaseshop/html/0/dyn_images/d_37_andressarda/im_NICESEPE.jpg')" class="producthead">
So I want to crawl this website and download only the pictures referred in this javascript.
Can anybody help me?? Tx
Jef
How to download pictures in embedded javascript???
PicaLoader can deal with JavaScript on many site by it default HTML Parser, but not all.
But now, PicaLoader 1.60 released, it have a new powerful feature: you can customize HTML Parser by Lua script!
So, for this site, you can create a new task:
Start URL:http://www.cazar.de/
Uncheck Support J/VB/JavaScript
Page URL Include Filters:/shop/index\.php
Page URL Exclude Filters:lang=1;cl=newsletter;cl=contact;cl=account;cl=basket;cl=suggest
Picture URL Include Filters:/im_
HTML Parser Script:
if string.find(HTML.Url,"cl=details",1,true) then
for pic in string.gmatch(HTML.Content,'javascript:zoomWin%b()') do
local ts,te=string.find(pic,"%b''");
local us,ue=string.find(pic,"%b''",te+1);
local title=string.sub(pic,ts+1,te-1);
local url=string.sub(pic,us+1,ue-1);
AddLink(url,HTML.Url,title,'',HTML.TaskID,HTML.Level);
end;
end;
DefaultParser(HTML.Content,HTML.Url,HTML.Title,HTML.TaskID,HTML.Level);
Other settings keep the default.
But now, PicaLoader 1.60 released, it have a new powerful feature: you can customize HTML Parser by Lua script!
So, for this site, you can create a new task:
Start URL:http://www.cazar.de/
Uncheck Support J/VB/JavaScript
Page URL Include Filters:/shop/index\.php
Page URL Exclude Filters:lang=1;cl=newsletter;cl=contact;cl=account;cl=basket;cl=suggest
Picture URL Include Filters:/im_
HTML Parser Script:
if string.find(HTML.Url,"cl=details",1,true) then
for pic in string.gmatch(HTML.Content,'javascript:zoomWin%b()') do
local ts,te=string.find(pic,"%b''");
local us,ue=string.find(pic,"%b''",te+1);
local title=string.sub(pic,ts+1,te-1);
local url=string.sub(pic,us+1,ue-1);
AddLink(url,HTML.Url,title,'',HTML.TaskID,HTML.Level);
end;
end;
DefaultParser(HTML.Content,HTML.Url,HTML.Title,HTML.TaskID,HTML.Level);
Other settings keep the default.
- Attachments
-
- de.jpg (112 KiB) Viewed 641 times
-
- de2.jpg (77.6 KiB) Viewed 641 times
PicaLoader 1.61 released, and it have a new feature: Export and Import task setting. now we can share task setting easily.
You can download the attached .plt file and save to your hard disk, then run PicaLoader, open a project, select main menu->Task->Import Tasks, select the plt file that you just saved to hard disk.
You can download the attached .plt file and save to your hard disk, then run PicaLoader, open a project, select main menu->Task->Import Tasks, select the plt file that you just saved to hard disk.
- Attachments
-
- cazar.plt
- download to your hard disk, then select main menu->Task->Import Tasks.
- (9.93 KiB) Downloaded 44 times
Just what I need
Wow great, I just does what it needs to do. Great.
does not work with me
does not work with me finish task without downloading any picz
but nancy.plt works fine
why?
parser script is great tool but i don't know how to use
C U~
but nancy.plt works fine
why?
parser script is great tool but i don't know how to use
C U~