#!/usr/bin/env 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/2009_swims +uit/models/"; for ($all_model_index =~ m{"/2009[^"]+/index2\.html"}g) { next if /(\/2009_swimsuit\/(models|dancers|tennis|onlocation)\/[-\w] ++\/)/; print "$_\n"; } # exit 0; while ($all_model_index =~ /(\/2009_swimsuit\/(models|dancers|tennis|o +nlocation)\/[-\w]+\/)/g) { doit("$1"); } doit("/2009_swimsuit/painting/$_/") for qw(brooklyn-decker julie-henderson irina-shayk jessica-white); my %done; sub doit { my $base = shift; return if $done{$base}++; print "$base =>\n"; my $model_index = get "http://sportsillustrated.cnn.com/$base/index2 +.html"; unless ($model_index) { $model_index = get "http://sportsillustrated.cnn.com/$base/"; } while ($model_index =~ m{\"(http://i.cdn.turner.com/si/pr/subs/swims +uit/images/)([\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"; } } }
In reply to Swimsuits2009
by merlyn
in thread Swimsuits2004
by zentara
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |