use strict; use warnings; use Fatal qw/ open close /; use WWW::Mechanize; use Carp; my $mech = WWW::Mechanize->new( autocheck => 1 ); open my $pro_list, '>>', 'profiles.out'; for my $curr_page (1..3) { $mech->get("http://indiecharts.com/indie_Music_Artists.asp?Key +word=&Page=$curr_page&butname="); my @artist_links = $mech->find_all_links(url_regex => qr/\d{9} +/); print scalar @artist_links, " matching links on page $curr_pag +e\n"; for my $artist_link (@artist_links) { print $pro_list $artist_link->text(), "\n"; } }
In reply to Re: Page Scraping
by akho
in thread Page Scraping
by 80degreez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |