Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I need to extract all links from web page.So I Use Mechanize Module for extracting link.I extract all links if Source is in tag for example
<a href=...> <area href=...> <frame src=...> <iframe src=...> <link href=...> <meta content=...>
Because In Mechanize module they defined these tag.so I extract all the links.But I could not extract one link from source .Source is like "location='http://www.loopnet.com/looplink/lund/qryradio.aspx".For that no definition in that module.i want to extract that link
This is my code
use strict; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get("any url"); my @links = $mech->links(); for my $link (@links) { printf "%s\n",$link->url; }
Help me in this problem to solve
Regards,
Senthil
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Link Extracter using Mechanizemodule
by Corion (Patriarch) on Aug 26, 2011 at 07:10 UTC | |
by Anonymous Monk on Aug 26, 2011 at 07:35 UTC | |
by Corion (Patriarch) on Aug 26, 2011 at 07:46 UTC | |
by Anonymous Monk on Aug 26, 2011 at 08:01 UTC | |
by jrowe (Scribe) on Aug 26, 2011 at 13:36 UTC |