pypi / trafilatura
trafilatura
What changed in trafilatura 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-21.
1 deprecations2 new APIs and options2 performance6 behavior and defaults36 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inittrafilatura 247 changes
Deprecations 1
The release adds more deprecation warnings.
New APIs and options 2
Adds the extract_with_metadata method.
Extraction adds support for meta name image.
Performance 2
Deduplication is simpler and faster.
XPath performance is faster using XSLT extensions.
Behavior and default changes 6
Boilerplate pruning is more targeted to reduce over-extraction.
Subelem processing was further improved, mostly for math, code, and Markdown.
The text recovery and extraction sequence was revamped for better overall recall and forum extraction.
Title extraction was improved.
Spacing is improved in item, cell, and code blocks.
The detector supports all Justext languages known to it.
Fixes and other changes 36
Brackets inside inline code in link text are no longer escaped.
The output contains fewer duplicated segments.
Image paragraphs are no longer repeated in the output.
Text after inline code is no longer repeated in the output.
Document handling was simplified and made more correct.
Downloads and decompression were overhauled, with more robust handling of relative URLs and zstd frames.
Link discovery improved for sitemap namespaces, Atom links, and JSON feeds.
Markdown output improved for spacing, bold spans, CommonMark escaping, and LaTeX math.
Metadata handling improved for word boundaries, JSON-LD types, OpenGraph, license links, list values, canonical URLs, and TXT/Markdown headers.
Fallbacks now preserve requested images.
Scoped caches are now accepted.
Text extraction improved for forms, link farms, inline code and links, infinite scroll, boilerplate widgets, nested lists, and text after blocks.
Image extensions are matched case-insensitively.
Metadata values are quoted so the Markdown header remains valid YAML.
Angle brackets in Markdown link destinations are escaped.
A space after inline formatting is preserved in Markdown list items.
List items whose only content is a link are retained.
Superscript and subscript boundaries are preserved in Markdown output.
Processing for nested elements was improved.
Text inside nobr tags is retained.
Output formatting bugs were addressed.
Text in sub-elements is handled better.
Table processing is more accurate.
Question headers in Yoast FAQ blocks are retained.
None values in code blocks are replaced.
Fixes eager matching by the doctype regular expression.
Code is changed to handle potential empty strings.
The fencedframe element is cleaned during extraction.
The tokenizer now strips the Ideographic Full Stop.
Images are preserved when links are included.
Refines image source URL handling and fixes table extraction bugs.
Links in tables are preserved when --links is enabled.
The no_fallback setting is propagated to the fast argument.
Fixes an AttributeError that node pruning could raise in certain cases.
Code in pre-tags is detected using indicators, and code formatting issues are fixed.
Table extraction is made more robust.