Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Looking for something like DBD::HTML::Table

by erix (Prior)
on Feb 27, 2021 at 08:37 UTC ( [id://11128872]=note: print w/replies, xml ) Need Help??


in reply to Updated: Looking for something like DBD::HTML::Table

I have no solution really. In my experience html is a bit too variable. I can't find anything DBI-ey (also looked in https://pgxn.org/ - no luck ). Of course, to get database-access you could slurp either html (via curl) or cleaned-up text (via links -dump) into a table but they'd just be 'raw' lines that you'd still have to select the correct table rows from. Still, for well recognizable/greppable rows it might work. And anyway, it is a reminder that postgresql's COPY knows how to read input from another program's STDOUT.

create table temp_slurps (line text); copy temp_slurps ( line ) from program 'links -dump -width 512 ${url}' +; select * from temp_slurps ; -- where ...

As they say, YMMV. I'm sure if you write a postgres extension (for pgxn.org) to extract-'read' html-tables from source it will be popular ;)

Log In?
Username:
Password:

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

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

    No recent polls found