
Beautiful Soup is a versatile, beginner-friendly Python library for parsing HTML and XML documents and extracting data with an intuitive, Pythonic API.
Key Features:
Whether you're learning web scraping, building data extraction scripts, or parsing complex HTML documents, Beautiful Soup provides HTML and XML parsing for Python.
Growing a website? Track its keywords, Google rankings, Search Console insights, and share of voice with bisibility. Free during beta.
Our productSource code
wention/BeautifulSoup4
Stars
227Forks
66Last commit
2015-03-28License
MITLanguage
PythonMetrics recorded 2026-10-16
Last push: 2022-11-08
License source: Repository license file
Beautiful Soup is a Python library for extracting data from HTML and XML. It works with a parser and provides methods to navigate, search and modify the resulting document tree.
Sources (checked ): Beautiful Soup documentation
Beautiful Soup is a Python library installed separately as beautifulsoup4. Import BeautifulSoup from bs4. It can use Python’s built-in html.parser, but Beautiful Soup itself is not part of the standard library.
Sources (checked ): Installing Beautiful Soup and a parser
Load the page’s HTML, parse it with BeautifulSoup, then select the elements containing the data you need. Read their text or attributes and save the results. Fetching pages and managing a crawl are separate parts of the workflow.
Sources (checked ): Beautiful Soup quick start
Parse the HTML and call get_text() on the document or selected tag. A separator and strip=True can help turn nested text into a readable string.
Sources (checked ): get_text()
Select the table, iterate through its tr elements, and read each row’s th or td cells. Use get_text() for cell text or read attributes for links and other values.
Sources (checked ): Searching the document tree
Beautiful Soup handles document parsing and extraction. Scrapy provides a crawling framework with request scheduling, spiders and export pipelines. For a small parsing task, Beautiful Soup may be sufficient; for a crawl, assess the surrounding features you would otherwise need to build.
Sources (checked ): Beautiful Soup; Scrapy overview
Verified against the wention/BeautifulSoup4 repository and the PyPI package.
Library or tool · Library / Self-hosted
Library or tool · Library / Self-hosted
Library or tool · Library / Self-hosted