#!/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 +005_swimsuit/"; while ($all_model_index =~ /(\/features\/2005_swimsuit\/models\/[-\w]+ +\.html)/g) { my $model_index = get "http://sportsillustrated.cnn.com/$1"; while ($model_index =~ /\"(http:\/\/i\.a\.cnn\.net\/si\/features\/20 +05_swimsuit\/models\/images\/)([-\w]+)t\.jpg\"/g) { my $url = "$1$2.jpg"; my $file = "RESULTS/$2.jpg"; print "$url => $file: "; if (-e $file) { print "skip\n"; } else { 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 Swimsuits2005
by merlyn
in thread Swimsuits2004
by zentara
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |