liveBook · Manning

Beautiful Soup

Also called BeautifulSoup, beautifulsoup4, bs4

Beautiful Soup is a Python library for parsing HTML and XML documents, navigating their parsed structures, and extracting or modifying their contents.

How 3 Manning books explain it

Learn AI Data Engineering

BeautifulSoup is a Python library for parsing HTML and XML documents into navigable structures and extracting or modifying their contents.

How it is used
Supports web-scraping pipelines by parsing fetched HTML for inspection, cleanup, and field extraction.
How deep it goes
Demonstrates tree parsing, element removal, CSS selection, missing-element guards, and price fallbacks; defers scalable normalization.
Examples
Uses cleaned product-page text and GORUCK title and sale-or-regular-price extraction examples.
What you can do after
Apply it via Beautiful Soup to parse fetched HTML and extract guarded title and price values.

Read how Learn AI Data Engineering explains Beautiful Soup →

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.

Read how Effective Data Analysis explains Beautiful Soup →

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 →

Also covered in

What to know first

Related concepts

Questions about Beautiful Soup

What is Beautiful Soup?

Beautiful Soup is a Python library for parsing HTML and XML documents, navigating their parsed structures, and extracting or modifying their contents.

Which Manning books explain Beautiful Soup?

Learn AI Data Engineering, Effective Data Analysis and The Quick Python Book, Fourth Edition.

What should I know before learning Beautiful Soup?

Manning books that teach Beautiful Soup usually introduce CSV, HTML, Python and contract first.

What is Beautiful Soup also called?

Beautiful Soup is also called BeautifulSoup, beautifulsoup4 or bs4.

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.