Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Extract Portion of HTML

by moritz (Cardinal)
on Sep 19, 2011 at 12:01 UTC ( [id://926724]=note: print w/replies, xml ) Need Help??


in reply to Extract Portion of HTML

use Mojo::DOM; print Mojo::DOM->new->parse($string)->at('.myBody')

Works pretty well with crappy HTML too.

Updated: changed from body to .myBody, thanks to Corion++

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-29 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found