home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 June
/
CHIP_CD_2004-06.iso
/
software
/
sidebar
/
install.msi
/
_7B27471208C53F88AEB37573606B77EA
/
_5208FC56AEA6438B9278374C05664CEA
< prev
next >
Wrap
Extensible Markup Language
|
2004-04-05
|
1KB
|
53 lines
<?xml version="1.0" encoding="utf-8" ?>
<root>
<bot name="Yahoo Slideshow">
<![CDATA[
function DetailsPage(url){
var exist=false;
var re = new RegExp("<img src=([^ \"]+) align=middle border=1 alt=\"([^\"]+)\" [^>]+>");
var text=slideshow.DownloadText(url);
var arr = re.exec(text);
if (arr!=null)
{
slideshow.AddImage(arr[1],url,arr[2]);
}
else
{
slideshow.log("Cannot find links to image on Yahoo "+url);
}
}
function IndexPage(url)
{
var exist=false;
var re = new RegExp("\<a href=\"/([^\"]+)\" class=regs\> View Photo\</a\>\<br\>");
var text=slideshow.DownloadText(url);
var lines=text.split("\n");
for(var i=0;i<lines.length;++i)
{
var line=lines[i];
var arr=re.exec(line);
if (arr!=null)
{
DetailsPage("http://news.yahoo.com/"+arr[1]);
exist=true;
}
}
if (!exist)
{
slideshow.log("Cannot find links to details page on yahoo "+url);
}
}
for (var i=1;i<=5;++i)
{
IndexPage("http://news.yahoo.com/news?tmpl=index2&cid=441&pg="+i+"&cap=0");
}
]]>
</bot>
</root>