Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Answer: How do I parse links out of a web page

by gregorovius (Friar)
on May 19, 2000 at 04:45 UTC ( #13170=categorized answer: print w/replies, xml ) Need Help??

Q&A > HTTP and FTP clients > How do I parse links out of a web page - Answer contributed by gregorovius

Unfortunately HTML::LinkExtor does not offer a way of extracting the link text from the 'A' tag. You can resort to the HTML::TokeParser instead.

The HTML::TokeParser perldoc contains a snippet that does exactly what you ask for, except that the link URLs it extracts can be relative so you need to concatenate a base to them.

  • Comment on Answer: How do I parse links out of a web page
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2017-11-18 14:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?