in reply to Re: Re: suck on www::mechanize question
in thread can't get www::mechanize to work on a web site
I was able to get around it like this:
my $maxtries = 10; my $i = 1; while ($i <= $maxtries) { $mech->follow_link(text => "Hey Jude (lennon/mccartney)", n => "1" +); last if $mech->success; $mech->back(); $i++; } $mech->success() or die "Can't find song page\n";
Of course, you can set $maxtries to whatever you think is prudent, and you can put in a sleep() in the loop if you think that might help.
Linda
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
STUCK on www::mechanize ->get()
by smackdab (Pilgrim) on Mar 01, 2004 at 22:13 UTC | |
by leira (Monk) on Mar 01, 2004 at 22:30 UTC |