Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Verifying external web links

by strat (Canon)
on Dec 05, 2001 at 19:42 UTC ( [id://129628]=note: print w/replies, xml ) Need Help??


in reply to Verifying external web links

For extracting all links from a html-Page, I often use HTML::LinkExtor.

The Perl-Cookbook says something like:

#!perl -w use strict; use HTML::LinkExtor; use LWP::Simple; my $baseUrl = $ARGV[0] || die "Usage: $0 url\n"; my $parser = HTML::LinkExtor->new(undef, $baseUrl); $parser->parse( get($baseUrl))->eof; foreach ( $parser->links){ my ($eltType, @elements) = @$_; while (@element){ my ($attrName, $attrValue) = splice(@element, 0, 2); print "$eltType: $attrName, $attrValue\n"; } # while } # foreach

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://129628]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-25 20:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found