shu has asked for the wisdom of the Perl Monks concerning the following question:
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Need help extracting data from web page
by dominix (Deacon) on Jan 15, 2004 at 10:29 UTC | |
my track : use TableExtract
-- dominix | [reply] [d/l] |
Re: Need help extracting data from web page
by gjb (Vicar) on Jan 15, 2004 at 14:22 UTC | |
In addition to the tips given above, you might also want to familiarize yourself with WWW::Mechanize, that provides a very intuitive way to scrape information from the web. To get the hang of it, you can use WWW::Mechanize::Shell which allows to to "browse" pages through WWW::Mechanize's functions using an interactive shell. The documentation to both modules should get you started. Hope this helps, -gjb- | [reply] |
Re: Need help extracting data from web page
by valdez (Monsignor) on Jan 15, 2004 at 12:11 UTC | |
Quick and dirty and not complete, but it works :)
Ciao, Valerio | [reply] [d/l] |
Re: Need help extracting data from web page
by cees (Curate) on Jan 15, 2004 at 17:07 UTC | |
Have a look at the Template::Extract module, which will take a Template Toolkit template snippet, and an HTML page, and it will parse all the data out of the HTML page and give you a big perl data structure with all the data. It does the reverse of what a normal templating system does. Instead of generating HTML, you are pulling data out of a structured HTML document...
The above code doesn't solve the whole problem, because it only parses the first section of names from the page. But you should be able to extend it to parse all the info (hint wrap another FOREACH block around the template) - Cees | [reply] [d/l] |