[ANN] TableScraper.jl - an easy way to scrape WELL-FORMED tables from webpages

13 Likes

Can also be scraped here.

2 Likes

Nice. Is it possible to use this to get wikipedia tables as LaTeX?

Specifically this one would look great in my LaTeX equation sheet, as opposed to my current screenshot.

2 Likes

the table looks wellformed so you can scrape it. but u need to know some css and HTML to do it properly i’d say.

I dont unfortunatly… Oh well

just wanted to check out the package quickly, something like this seemed to kind of work

@chain begin
           scrape_tables("https://en.wikipedia.org/wiki/Z-transform", identity)
           _[8]
           DataFrame
           transform(1 => ByRow(nodeText) => :number)
           transform(2:4 .=> ByRow(function(x)
               try
                   x.children[1].children[2].attributes["alt"]
               catch
                   missing
               end
           end) .=> ["Signal", "Z-Transform", "ROC"])
           select(Not(1:4))
        end
2 Likes

Well done I guess it’s not that hard