in reply to Re: Re: Re: suck on www::mechanize question
in thread can't get www::mechanize to work on a web site
use WWW::Mechanize; use URI::URL; use strict; use warnings; my $artist = 'The Beatles'; my $title = 'Hey Jude'; my $mech = WWW::Mechanize->new(autocheck=>1); #$mech->agent_alias('Windows IE 6'); my $search = join("+", split(/ /, $artist)) . "+" . join("+", split(/ +/, $title)); print "search=" . "http://search.lyrics.astraweb.com/?word=$search" . + "\n"; $mech->get("http://search.lyrics.astraweb.com/?word=$search"); $mech->success() or die "Can't get the search page\n"; $mech->follow_link(text=>"Hey Jude"); #$mech->follow_link(n=>6); $mech->success() or die "Can't find lyrics page\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: STUCK on www::mechanize ->get()
by leira (Monk) on Mar 01, 2004 at 22:30 UTC |