Advertisement
Advertisement
| 06.30.2008 at 08:30AM PDT, ID: 23527220 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: |
use WWW::Mechanize;
my $mech = WWW::Mechanize->new();
my $count=1;
for my $start10 (0..900) {
my $start = $start10 * 10;
$mech->get("http://www.domainname.net/search/?start=$start");
$mech->save_content(sprintf("file%04d.txt", $count++));
foreach my $link1 ($mech->links) {
next unless $link1->url =~ m|http://www.domainname.net/.*/\?sort=alphab|;
$mech->get($link1->url);
$mech->save_content(sprintf("file%04d.txt", $count++));
foreach my $link2 ($mech->links) {
next unless $link2 =~ m|http://www.domainname.net/pages/.*/|;
$mech->get($link2->url);
$mech->save_content(sprintf("file%04d.txt", $count++));
}
}
}
|