Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 wandering the Monastery: (3)
As of 2017-02-26 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (372 votes). Check out past polls.