home *** CD-ROM | disk | FTP | other *** search
- <?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>