readability-lxml
fast html to text parser (article readability tool) with python 3 support
What it is and what it does
readability-lxml is a Python port of arc90's Readability algorithm that parses HTML documents and isolates the main article content—title, body text, and optionally images—stripping away navigation, ads, and boilerplate. It uses lxml for DOM manipulation and cssselect for content scoring, applying heuristics to identify the primary reading material.
The package is designed for content extraction pipelines where you need clean article text from HTML. It supports CJK text, can preserve multiple images per article, and outputs HTML5-formatted summaries. With 2058771 monthly downloads, it serves as a standard tool for news aggregators, content analysis systems, and archival tools.
Use it for:
- Extract article text from HTML documents for content aggregation or archival without manual parsing
- Build a content pipeline that isolates main text from pages with heavy sidebar and footer markup
- Prepare training data for NLP models by cleaning HTML-sourced documents to pure article text
- Implement a reader mode or reading list feature that strips formatting and focuses on text
- Analyze article metadata (title, author, images) from bulk HTML content
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Extracts and cleans the main article text and title from HTML documents using lxml-based parsing and heuristic content detection.
Yes, if you need reliable article extraction from HTML documents. The low install friction, permissive license, and broad Python version support (3.8–3.13) make it practical. The aging maintenance status (468 days since last release) is a minor concern for a stable, mature tool, but verify that recent HTML patterns in your target documents still parse correctly before committing to production use.
Install
readability-lxml on PyPI
pip
pip install readability-lxmluv
uv add readability-lxmlpoetry
poetry add readability-lxmlInstalling readability-lxml
Before you install
Low friction: pure Python wheel with four straightforward runtime dependencies (chardet, lxml, cssselect, lxml-html-clean). Maintenance status is aging—last release was 468 days ago—but the repository remains active and the package has accumulated 2895 stars.
License in practice
Apache License 2.0 is permissive, allowing commercial and private use with minimal restrictions; you must retain license and copyright notices but face no copyleft obligations.
Quickstart
pip install readability-lxml
from readability import Document
doc = Document(html_content)
print(doc.title())
print(doc.summary())
Verify before relying
- Current performance characteristics on large documents or high-volume extraction workloads
- Compatibility with modern HTML5 edge cases beyond the changelog's mention of improved HTML5 tag handling
- Whether the package requires external HTTP fetching or works only with pre-downloaded HTML content
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — chardet, lxml, cssselect, lxml-html-clean |
| Maintenance | aging — 468 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,058,771/month — #3,334 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: readability_lxml-0.8.4.1-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
breadabilityExtracts the main readable content from HTML…
permissive · top 15,000 on PyPI
readabilipyExtracts article content from HTML using either…
permissive · top 5,000 on PyPI
jusTextjusText removes boilerplate content…
permissive · top 5,000 on PyPI
readable-contentExtracts the main article content from web…
permissive · top 15,000 on PyPI
turbohtmlParse, query, edit, and serialize HTML and XML…
permissive · top 15,000 on PyPI
textractExtracts text from documents in multiple…
permissive · top 15,000 on PyPI
docx2pythonExtracts text, images, headers, footers,…
permissive · top 15,000 on PyPI
textacytextacy extends spaCy's NLP capabilities with…
permissive · top 15,000 on PyPI
Crawl4AICrawl4AI is an async web crawler and scraper…
permissive · top 5,000 on PyPI