I am trying to get the lyrics for a song...w/o success
use WWW::Mechanize;
use URI::URL;
use strict; use warnings;
my $artist = 'The Beatles';
my $title = 'Hey Jude';
my $mech = WWW::Mechanize->new();
my $search = join("+", split(/ /, $artist)) . "+" . join("+", split(/
+/, $title));
print "search=$search\n";
$mech->get("http://search.lyrics.astraweb.com/?word=$search");
$mech->success() or die "Can't get the search page\n";
#print $mech->content();
#$mech->follow_link(url_regex=>qr/$title/i);
$mech->follow_link(url_regex=>qr/hey jude/i);
#$mech->follow_link(text=>"Hey Jude");
$mech->success() or die "Can't find song page\n";
print $mech->content();
I get the search results, but can't figure out how to get the "song link"...any help is appreciated!!!
--
update: changed title