skillfed

jusText

Heuristic based boilerplate removal tool

justext v3.0.2 11.7M downloads/30d#1,368 on PyPI822
Permissive license The BSD 2-Clause License AGING released

What it is and what it does

jusText is a heuristic-based tool for extracting main content from HTML pages by filtering out boilerplate elements like navigation, headers, and footers. It operates by analyzing text density and sentence structure, making it particularly suited for building linguistic corpora and web-scraped datasets where clean, sentence-bearing text is needed.

The package provides both a command-line interface (via `python -m justext`) and a Python API. It depends on lxml for HTML parsing and includes language-specific stoplists to improve detection accuracy. The core algorithm preserves paragraphs containing full sentences while marking others as boilerplate, allowing you to filter results programmatically.

Use it for:

  • Build web corpora for natural language processing by extracting clean text from crawled HTML pages
  • Preprocess web content before feeding it into linguistic analysis or text processing pipelines
  • Automate extraction of article text from news sites or blogs while discarding navigation and ads
  • Clean HTML snapshots for archival or readability analysis in web preservation workflows
  • Remove noise from web-scraped training data for text classification or language models

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

jusText removes boilerplate content (navigation, headers, footers) from HTML pages while preserving text with full sentences, useful for extracting clean content for linguistic analysis and web corpora.

Yes, with conditions. The package is stable (Production/Stable classifier), permissively licensed, and has low install friction. However, maintenance is aging (535 days since last release), so it is best suited for established use cases where the algorithm is known to work well for your content type. Verify that lxml compiles on your target platform and that boilerplate detection accuracy meets your needs before production use.

Install

justext on PyPI

pip

pip install justext

uv

uv add justext

poetry

poetry add justext

Installing jusText

Before you install

Low friction: pure Python wheel, only two runtime dependencies (lxml and backports.functools-lru-cache). Maintenance status is aging—last release 535 days ago, but repository is active (last commit 2025-02-25) with no archived flag.

License in practice

BSD 2-Clause License (permissive). No restrictions on commercial use, modification, or redistribution; standard permissive terms apply.

Quickstart

import justext

paragraphs = justext.justext(html_content, justext.get_stoplist("English"))
for paragraph in paragraphs:
    if not paragraph.is_boilerplate:
        print(paragraph.text)

lxml requires libxml2 and libxslt system libraries; may need compilation on some platforms.

Verify before relying

  • Performance characteristics on very large HTML documents or high-throughput scenarios
  • Accuracy of boilerplate detection across non-English languages and modern web layouts
  • Whether backports.functools-lru-cache is still required on modern Python versions

Package facts

License The BSD 2-Clause License (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — lxml, backports.functools-lru-cache
Maintenance aging — 535 days since the last release
Last repo commit
First released
Downloads 11,719,151/month — #1,368 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: justext-3.0.2-py2.py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Internet :: WWW/HTTPTopic :: Software Development :: Pre-processorsTopic :: Text Processing :: FiltersTopic :: Text Processing :: Markup :: HTML

Tags

html boilerplate removalextract main text from htmlweb content extractionremove navigation headers footershtml text cleaninglinguistic corpus buildingboilerplate stripping
content-extractionweb-scrapingnlp-preprocessing

More WWW/HTTP packages