Comparing
HTML and XML parsing library for extracting data from web pages with a simple Pythonic API.
Drop-in datetime replacement with first-class timezone support, DST awareness, and intuitive arithmetic.
| Metric | beautifulsoup4 | pendulum |
|---|---|---|
| Ecosystem | Python | Python |
| Difficulty | Beginner | Beginner |
| Weekly downloads | 9.0M↑ | 2.0M |
| Latest version | v4.12.3 | v3.0.0 |
| Recipes | 2↑ | 1 |
beautifulsoup4 only
Shared
pendulum only
Scraping static HTML pages, extracting data from email templates, parsing HTML in tests, processing XML feeds, cleaning up messy HTML.
Scheduling apps, calendar features, time-series data across timezones, any app where DST bugs would be costly.
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.
Simple UTC-only timestamps where datetime.now(timezone.utc) is sufficient. pendulum is heavier than stdlib.
beautifulsoup4
pendulum