
You didn't write that awful page. You're just trying to get some data out of it. Right now, you don't really care what HTML is supposed to look like.
Neither does this parser.
"A tremendous boon." -- Python411 Podcast
[ Download | Documentation | Source | What's New | Contributors | Discussion group ]Having problems with version 3.1.0? See here.
If you have questions, send them to the discussion group.
Beautiful Soup is a Python HTML/XML parser designed for quick turnaround projects like screen-scraping. Three features make it powerful:
Beautiful Soup parses anything you give it, and does the tree traversal stuff for you. You can tell it "Find all the links", or "Find all the links of class externalLink", or "Find all the links whose urls match "foo.com", or "Find the table heading that's got bold text, then give me that text."
Valuable data that was once locked up in poorly-designed websites
is now within your reach. Projects that would have taken hours take
only minutes with Beautiful Soup.
Download Beautiful Soup
If you're using Python 2.3 through 2.6, the 3.0 series is the best choice. The most recent release in the 3.0 series is 3.0.8.1, released April 9, 2010.
If you're using Python 3.0, you must use the 3.1 series. Beautiful Soup version 3.1.0.1 was released January 6, 2009. You can use the 3.1 series with earlier versions of Python, but you might run into the problems described here. (I consider the 3.1 series a failed experiment and will eventually be replacing it, but it's here if you really need it.)
Beautiful Soup is licensed under the same terms as Python itself, so you can drop BeautifulSoup.py into almost any Python application (or into your library path) and start using it immediately.
Older versions are still available: the 1.x series works with Python 1.5, and the 2.x series still has some installed base. The 3.0.x series is known to work with Python 2.3.
Development happens at Launchpad.
|
This document (source) is part of Crummy, the webspace of Leonard Richardson (contact information). It was last modified on Friday, April 09 2010, 19:42:05 Nowhere Standard Time and last built on Thursday, September 02 2010, 14:00:02 Nowhere Standard Time.
| Document tree: Site Search: |