punch_card_don has asked for the wisdom of the Perl Monks concerning the following question:
Looking for a good, simple, quick to get up and running, module to scrape some data from a table in a web page.
The url is basic, no authentication.
The table looks like:
| City 1 | Cloudy | -5°C |
| City 2 | Cloudy | -10°C |
| City 3 | Light Snow | 1°C |
| City 4 | Fog Depositing Ice | -11°C |
And I want to scrape off the city names, conditions, temperature. I can count on the columns always being in the same order.<table width="100%" border=1 cellspacing="1" cellpadding="1"> <TR valign="top" BGCOLOR=#FFFFFF> <td align="top"><a href='/forecast/city.html?1'>City 1</a></td><td now +rap align="top">Cloudy</td><td nowrap align="right">-5°C</td></tr +> <TR valign="top" BGCOLOR=#EEF5EE> <td align="top"><a href='/forecast/city.html?2'>City 2</a></td><td now +rap align="top">Cloudy</td><td nowrap align="right">-10°C</td></t +r> <TR valign="top" BGCOLOR=#FFFFFF> <td align="top"><a href='/forecast/city.html?3'>City 3</a></td><td now +rap align="top">Light Snow</td><td nowrap align="right">1°C</td>< +/tr> <TR valign="top" BGCOLOR=#EEF5EE> <td align="top"><a href='/forecast/city.html?4'>City 4</a></td><td now +rap align="top">Fog Depositing Ice</td><td nowrap align="right">-11&d +eg;C</td></tr> </table>
Not hard to write a custom parser, but if thee's a module out there ideally suited to this kind of thing, that'd be preferable.
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Best module to scrape tabular data fram web pages?
by kwaping (Priest) on Mar 10, 2006 at 15:49 UTC | |
|
Re: Best module to scrape tabular data fram web pages?
by ptum (Priest) on Mar 10, 2006 at 15:24 UTC | |
|
Re: Best module to scrape tabular data fram web pages?
by mojotoad (Monsignor) on Mar 10, 2006 at 17:25 UTC | |
|
Re: Best module to scrape tabular data fram web pages?
by Mutant (Priest) on Mar 10, 2006 at 15:46 UTC | |
|
Re: Best module to scrape tabular data fram web pages?
by punch_card_don (Curate) on Mar 10, 2006 at 17:06 UTC | |
by kwaping (Priest) on Mar 10, 2006 at 19:15 UTC | |
|
Re: Best module to scrape tabular data fram web pages?
by xern (Beadle) on Mar 11, 2006 at 23:17 UTC | |
|
Re: Best module to scrape tabular data fram web pages?
by zentara (Cardinal) on Mar 10, 2006 at 17:59 UTC |