[ Download | Documentation | Hall of Fame | For enterprise | Source | Changelog | Discussion group | Zine ]
You didn't write that awful page. You're just trying to get some data out of it. Beautiful Soup is here to help. Since 2004, it's been saving programmers hours or days of work on quick-turnaround screen scraping projects.
Beautiful Soup is a Python library 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.
Interested? Read more.
If you have questions, send them to the discussion group. If you find a bug, file it on Launchpad. If it's a security vulnerability, report it confidentially through Tidelift.
If you use Beautiful Soup as part of your work, please consider a Tidelift subscription. This will support many of the free software projects your organization depends on, not just Beautiful Soup.
If Beautiful Soup is useful to you on a personal level, you might like to read Tool Safety, a short zine I wrote about what I learned about software development from working on Beautiful Soup. Thanks!
The current release is Beautiful Soup
4.10.0 (September 7, 2021). You can install Beautiful Soup 4 with
pip install beautifulsoup4.
In Debian and Ubuntu, Beautiful Soup is available as the
python-bs4 package (for Python 2) or the
python3-bs4 package (for Python 3). In Fedora it's
available as the
Beautiful Soup is licensed under the MIT license, so you can also
download the tarball, drop the
bs4/ directory into almost
any Python application (or into your library path) and start using it
immediately. (If you want to do this under Python 3, you will need to
manually convert the code using
Beautiful Soup 4 works on both Python 2 (2.7+) and Python 3. Support for Python 2 will be discontinued on or after December 31, 2020—one year after the Python 2 sunsetting date.
Beautiful Soup 3 was the official release line of Beautiful Soup from May 2006 to March 2012. It does not support Python 3 and it will be discontinued on or after December 31, 2020—one year after the Python 2 sunsetting date. If you have any active projects using Beautiful Soup 3, you should migrate to Beautiful Soup 4 as part of your Python 3 conversion.
Here's the Beautiful Soup 3 documentation.
The current and hopefully final release of Beautiful Soup 3 is 3.2.2 (October 5,
2019). It's the
BeautifulSoup package on pip. It's also
python-beautifulsoup in Debian and Ubuntu,
python-BeautifulSoup in Fedora.
Once Beautiful Soup 3 is discontinued, these package names will be available for use by a more recent version of Beautiful Soup.
Beautiful Soup 3, like Beautiful Soup 4, is supported through Tidelift.
Over the years, Beautiful Soup has been used in hundreds of different projects. There's no way I can list them all, but I want to highlight a few high-profile projects. Beautiful Soup isn't what makes these projects interesting, but it did make their completion easier:
If you've used Beautiful Soup in a project you'd like me to know about, please do send email to me or the discussion group.
Development happens at Launchpad. You can get the source code or file bugs.
This document (source) is part of Crummy, the webspace of Leonard Richardson (contact information). It was last modified on Wednesday, December 08 2021, 21:41:28 Nowhere Standard Time and last built on Tuesday, January 18 2022, 07:00:01 Nowhere Standard Time.