Beautiful Soup
Beautiful Soup is a Python library for parsing HTML and XML documents, navigating their parsed structures, and extracting or modifying their contents.
Effective Data Analysis
BeautifulSoup is a Python library for parsing HTML and XML documents into navigable object trees.
- How it is used
- Supports web scraping when HTML pages must be converted into analysis-ready records.
- How deep it goes
- Explains tree navigation, tag and class selection, attribute extraction, dataframe creation, type conversion, and aggregation.
- Examples
- Uses a weather forecast and a Books to Scrape exercise involving titles, metadata, pagination, data types, and competitor analysis.
- What you can do after
- Builds structured data from selected HTML tags and attributes using Python, then prepares extracted values for analysis.
The Quick Python Book, Fourth Edition
Beautiful Soup is a Python library for parsing HTML and XML documents and navigating their parsed trees.
- How it is used
- Supports web scraping by parsing retrieved HTML and extracting targeted content.
- How deep it goes
- Explains parser construction, tag searches, indexing, text, attributes, and class selection, but not advanced parser behavior.
- Examples
- Uses test.html, an anchor element, a special span, and short expressions for retrieving text and attributes.
- What you can do after
- Apply Beautiful Soup to parse retrieved HTML and extract links, visible text, attributes, and class-selected elements.
Read how The Quick Python Book, Fourth Edition explains Beautiful Soup →
Related concepts
- HTMLuses · HTML (HyperText Markup Language) is the standard markup language for structuring content and elements in web documents.
- scrapingused by · Scraping is the automated or systematic retrieval and extraction of information from digital sources.
- web crawlerused by · A web crawler is an automated program that retrieves and processes web resources, follows links, and discovers content for indexing or analysis.
- yfinanceused by · yfinance is a Python library for retrieving financial market data from Yahoo Finance through a programmatic interface.
- parse treeproduces · A parse tree is a hierarchical representation of the syntactic structure derived by parsing an expression, program, or structured document.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

