BeautifulSoup: Get the contents of a specific table

Posted by Adam Matan on Stack Overflow See other posts from Stack Overflow or by Adam Matan
Published on 2010-05-29T15:41:56Z Indexed on 2010/05/29 15:52 UTC
Read the original article Hit count: 295

Filed under:
|
|
|

Hi,

My local airport disgracefully blocks users without IE, and looks awful. I want to write a Python scripts that would get the contents of the Arrival and Departures pages every few minutes, and show them in a more readable manner.

My tools of choice are mechanize for cheating the site to believe I use IE, and BeautifulSoup for parsing page to get the flights data table.

Quite honestly, I got lost in the BeautifulSoup documentation, and can't understand how to get the table (whose title I know) from the entire document, and how to get a list of rows from that table.

Any ideas?

Adam

© Stack Overflow or respective owner

Related posts about python

Related posts about html