extract HTML table in a structured format

Chris Angelico rosuav at gmail.com
Wed Apr 10 21:04:45 EDT 2013


On Thu, Apr 11, 2013 at 4:15 AM, Jabba Laci <jabba.laci at gmail.com> wrote:
> Hi,
>
> Thanks, it's a great idea to parse the wiki source. Since then I have found
> a command for this particular task called "ubuntu-support-status" that shows
> what I need.

That sounds like an even better option. Anything that depends on
parsing a wiki is vulnerable to format changes at a moment's notice,
even worse than other web page parsing.

> But the idea to extract an HTML table from a webpage in a structured format
> could be an interesting (and useful) project idea.

There are, unfortunately, too many different ways this can be done.
Too many differences in HTML that a human eye would read as the same
thing. I'd recommend either BeautifulSoup or specifically looking at
the HTML to be parsed and finding a shortcut from that.

ChrisA



More information about the Python-list mailing list