in reply to Logging URLs that don't return 1 with $mech->success
That would only follow the first link on that page matching some regex.# loop through the current page's links and use ->follow_link( text_re +gex => q/$_/i to find and follow the current link
That may be what you want, but it reads as though you'd want to do something like:
for my $link ($mech->find_all_links) { # on this page $mech->get($link->url); unless ($mech->success) { warn "can't get ".$link->url.", status: ".$mech->status; } $mech->back; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Logging URLs that don't return 1 with $mech->success
by stonecolddevin (Parson) on Sep 11, 2008 at 00:10 UTC | |
by ikegami (Patriarch) on Sep 11, 2008 at 01:14 UTC | |
by stonecolddevin (Parson) on Sep 11, 2008 at 01:19 UTC |