Skip to main content

etrafilatura

PyPI Python Docs CI Upstream

Python binding of trafilatura-rs — the pure-Rust engine by nchapman that extracts the main text, comments and metadata of web pages, stripping boilerplate, with trafilatura's syntax: same signatures, same lxml trees in trafilatura's vocabulary, trafilatura's own renderers — on a compiled engine, with three dependencies instead of seven and the GIL released.

📖 Documentation: https://edamlabs.github.io/etrafilatura/

pip install etrafilatura       # or: uv add etrafilatura
import etrafilatura as trafilatura   # drop-in syntax

downloaded = trafilatura.fetch_url("https://example.org/article")
trafilatura.extract(downloaded, output_format="markdown", with_metadata=True)

trafilatura.extract(html_string)                       # 'txt' by default
trafilatura.bare_extraction(html_string)               # Document with .text, .body, .comments…
trafilatura.extract_metadata(html_string)              # title, author, date, sitename…

trafilatura.extract("https://example.org/article", input_format="auto")   # extension: fetch, then extract

Benchmark — pytest-benchmark medians against Python trafilatura 2.3.1: on the two real pages (PEP 8, Wikipedia), 1.2–1.5× faster plain-text extraction, 1.6–2.1× with XML and metadata, 2.7–4.4× on metadata alone. Extraction on small synthetic pages, under a millisecond, weighs the Python-side tree conversion more: 0.6–2.9×. html2txt and baseline run the same vendored code on both sides and measure the noise: 0.9–1.2× (full matrix and method).

etrafilatura vs trafilatura

Agreement with trafilatura — on the synthetic test pages, 64 of 84 format cases are byte-identical and the other 20 are declared differences (tags, TEI version). On the eight-page corpus, real pages included, word-token agreement is 99.5 % (txt) and 99.6 % (markdown); the real pages differ by the engine's content selection (method, map).

Outputs Every output format, and what each carries
Benchmark Timings against Python trafilatura, per method and document
API extract, bare_extraction, fetch_url, extract_metadata, …
Errors What can fail, and how to catch it
Compatibility Drop-in map from trafilatura, and the known gaps
Self-maintenance How the binding follows trafilatura-rs on its own

Extraction quality, heuristics and performance belong to trafilatura-rs: extraction issues go upstream, Python API issues here.

MIT, binding © EDamLabs; the engine is Apache-2.0. Wheels statically link the engine and its dependencies; their licenses ship in THIRD_PARTY_LICENSES.md.

Metadata

Release files for etrafilatura 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for etrafilatura 0.1.0
File Size Uploaded Provenance
etrafilatura-0.1.0.tar.gz 122.5 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for etrafilatura 0.1.0
File
etrafilatura-0.1.0-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
etrafilatura-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64 Details
etrafilatura-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64 Details
etrafilatura-0.1.0-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details
etrafilatura-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details

Total release size: 13.6 MB

Release files / etrafilatura-0.1.0.tar.gz

Download URL etrafilatura-0.1.0.tar.gz
Size 122.5 kB
Tags Source
SHA-256 checksum
How to use checksums
dbcae6b61dade220c68387c30a4c7b1ff8078867c4d27f7a7a9867c0bcb819d6
BLAKE2b-256 checksum
How to use checksums
93078d08978f598bc992bd432e0ecec91fee0b564e1586cdb956ed2c274d41f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / etrafilatura-0.1.0-cp312-abi3-win_amd64.whl

Download URL etrafilatura-0.1.0-cp312-abi3-win_amd64.whl
Size 2.7 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
21f8245b39ae8983181ede4eeb1a3346708f75d0d80b81dbfea50a733ba5f323
BLAKE2b-256 checksum
How to use checksums
fb9cf3cbd27e6ebf75c757cc2778277483a27731fa17dae12a603b115b7823f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / etrafilatura-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl

Download URL etrafilatura-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
3fa0deef78d86b81aa6ee3bb5298e8c531e1dd18ed7d8325d47078bceabf2485
BLAKE2b-256 checksum
How to use checksums
ec833d0b41e79abcfb2616427230670eb3797c98cb4362d3aab18916c171d147
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / etrafilatura-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl

Download URL etrafilatura-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl
Size 2.7 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
f1b32423510022236f92971d3a79fc32ad8a152638a950ecf0b6be524e7f31b2
BLAKE2b-256 checksum
How to use checksums
2cf764c586db0c0a4eb7d80012b46938380bfc7390acc1f0e4cc0a8e46c3b89c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / etrafilatura-0.1.0-cp312-abi3-macosx_11_0_arm64.whl

Download URL etrafilatura-0.1.0-cp312-abi3-macosx_11_0_arm64.whl
Size 2.6 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
74a810a40472107ad62903efe4400013f6e2e54381f19a32cc5aff85eb944cce
BLAKE2b-256 checksum
How to use checksums
db4b50a52676761b43272f95efd250fcb74137245af33564d9ee017cfd513dbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / etrafilatura-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl

Download URL etrafilatura-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl
Size 2.7 MB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
0f60ef379892c8607949ff3968c1b2880cf1e2640b55b5cb6f9fa3586e7cf0c5
BLAKE2b-256 checksum
How to use checksums
7dcd7871d6c49d17db3c4b63ce74bd28518f2eece4418d2706fb5d2079e69539
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Security for etrafilatura 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for etrafilatura-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

6 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page