Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Screen scraping

by ambrus (Abbot)
on Dec 28, 2015 at 17:03 UTC ( #1151277=note: print w/replies, xml ) Need Help??


in reply to Screen scraping

See Re: How to extract text present in 3 lines within the HTML tags as an example for how to use the XML::Twig module to parse HTML input. This isn't the only perl module you could use, but let's stick to it for now. That answer also shows how to extract text inside a HTML element once you've found the element.

Now you just need one more piece to solve your problem. You have to find the right element, which isn't just any div element, but the div element with the particular id attribute. For that, look at the documentation of the XML::Twig module for a method of XML::Twig that returns an element of a particular id. If you can't find it, look at the hint under the fold.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2020-10-24 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (242 votes). Check out past polls.

    Notices?