[Pdx-pm] NEWBIE question - Am i making this too complex parsing
HTML
Andy Lester
andy at petdance.com
Sat May 7 16:25:14 PDT 2005
On May 7, 2005, at 4:06 PM, Pete Lancashire wrote:
> I have a URL that returns two MAPs. I need to extract
> all the HREFs from one of the maps. The one with the
> name 'region'. What I came up with is:
Look at WWW::Mechanize. It's a superclass of LWP::UserAgent that does
lots of common stuff for you.
I believe you can do:
my $mech = WWW::Mechanize->new( autocheck=>1 );
$mech->get( $url );
my @links = $mech->find_links( tag => "map" );
It's been a while since I've worked on Mech. Maybe this is a sign.
xoa
--
Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance
More information about the Pdx-pm-list
mailing list