in reply to Band under RIAA?
#!/usr/bin/perl # usage: $0 <ARTIST> <#PAGES> use strict; use warnings; use LWP::Simple; my $artist = shift || "Moby"; my $pages = shift || 1; # increase if artist is listed with more than + 1 page for my $pageno ( 0 .. $pages ) { my $page = get( qq(http://riaaradar.com/search.asp?keyword=$artist&page=$pageno) ); my %record; for my $line ( split /\n/, $page ) { if ( $line =~ m{<input type="hidden" name="([^"]+)" value="([^"]+) +} ) { $record{$1} = $2; } if ( $record{result} ) { if ( $record{artist} =~ /$artist/o ) { print "$_ $record{$_}\n" for (qw(artist album result)); print "\n"; } %record = (); } } }
|
|---|