Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: cURL help

by Ryszard (Priest)
on Feb 16, 2003 at 17:50 UTC ( [id://235755]=note: print w/replies, xml ) Need Help??


in reply to cURL help

If you add LWP::Simple to HTML::TableExtract you've got a great deal of flexibility when parsing web pages.

To make page parsing a little easier:

local*FH; open (FH, '>/tmp/somefile.txt'); $te->parse($content); # $content is your HTML page from LWP::Simple foreach my $ts ($te->table_states) { print FH "Table (", join(',', $ts->coords), "):\n"; foreach my $row ($ts->rows) { print FH join(',', @$row), "\n"; } } close FH;
Which is lifted pretty much as is from the HTML::TableExtract documentation. I output it to a file so i can look at the output with the flexibility of my favourite text editor (vi).

I should point out the above code example will print out the co-ords of the tables in your page and the content of each cell.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-19 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found