pkgdocs/compare/beautifulsoup4 vs pendulum

Comparing

Python

beautifulsoup4

HTML and XML parsing library for extracting data from web pages with a simple Pythonic API.

9.0M/ wk
v4.12.3
vs
Python

pendulum

Drop-in datetime replacement with first-class timezone support, DST awareness, and intuitive arithmetic.

2.0M/ wk
v3.0.0
Metricbeautifulsoup4pendulum
EcosystemPythonPython
DifficultyBeginnerBeginner
Weekly downloads9.0M↑2.0M
Latest versionv4.12.3v3.0.0
Recipes2↑1

Tags

beautifulsoup4 only

scrapinghtmlwebxml

Shared

parsing

pendulum only

datetimetimezoneutilities

When to use each

beautifulsoup4

Scraping static HTML pages, extracting data from email templates, parsing HTML in tests, processing XML feeds, cleaning up messy HTML.

pendulum

Scheduling apps, calendar features, time-series data across timezones, any app where DST bugs would be costly.

When to skip each

beautifulsoup4

JavaScript-rendered pages (use Playwright or Selenium). High-volume scraping at scale (use Scrapy). When the site has a proper API — always prefer the API.

pendulum

Simple UTC-only timestamps where datetime.now(timezone.utc) is sufficient. pendulum is heavier than stdlib.

Sample recipes

beautifulsoup4

  • Scrape article titles from a news page
  • Parse a table into a list of dicts

pendulum

  • Work with timezones safely