#!/usr/bin/perl use strict; $|++; use LWP::Simple; -d "RESULTS" or mkdir "RESULTS", 0755 or die "cannot mkdir RESULTS: $! +"; my $all_model_index = get "http://sportsillustrated.cnn.com/features/2 +006_swimsuit/"; while ($all_model_index =~ /(\/features\/2006_swimsuit\/(allstar|model +s)\/[-\w]+\.html)/g) { doit("$1"); } doit("/features/2006_swimsuit/allstar/allstar_reunion.html"); doit("/features/2006_swimsuit/athletes/"); doit("/features/2006_swimsuit/painting/"); sub doit { my $model_index = get "http://sportsillustrated.cnn.com/" . shift; while ($model_index =~ /\'(http:\/\/i.a.cnn.net\/si\/features\/2006_ +swimsuit\/images\/gallery\/photos\/)([\w.\-]+)t.jpg\'/g) { my $url = "$1$2.jpg"; my $file = "RESULTS/$2.jpg"; if (-e $file) { print "$url => $file: "; print "skip\n"; } else { print "$url => $file: "; print mirror($url, $file), "\n"; } } }
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Swimsuits2006
by merlyn
in thread Swimsuits2004
by zentara
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |