This page covers the most common problems encountered when using Trafilatura for content extraction and web downloads, along with practical fixes for each. Trafilatura is thoroughly tested, but some issues are environment-specific. If your problem is not listed here, check the open issues on GitHub.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/adbar/trafilatura/llms.txt
Use this file to discover all available pages before exploring further.
Empty or incomplete output
Not enough content extracted
Content extraction is a trade-off between precision (avoiding boilerplate) and recall (capturing all relevant text). Trafilatura is optimized for article and blog-post pages — results can be sparse on link lists, galleries, or catalog pages. If you are getting too little content, try the following in order: 1. Switch to recall modeMIN_EXTRACTED_SIZE setting (default: 250 characters) determines when fallback extraction is triggered. Lowering it makes Trafilatura more willing to return short content. Edit settings.cfg:
Trafilatura is primarily designed for article pages, blog posts, and main text sections. Output quality varies on link-heavy pages, image galleries, product catalogs, and similar non-article content types.
Too much noise or irrelevant content
Output contains too much boilerplate
If the extracted text includes navigation menus, footers, sidebars, or other unwanted content, try the following: 1. Switch to precision modeprune_xpath parameter lets you remove elements by XPath expression before extraction runs:
Download failures
Network timeout
The defaultDOWNLOAD_TIMEOUT is 30 seconds. Increase it in settings.cfg for slow servers:
User-agent blocked
Some websites block Trafilatura’s default user-agent string. You can supply a custom one insettings.cfg:
Cookie required
For pages that require authentication cookies, add them tosettings.cfg:
cookiejar with urllib3.
Using pycurl for better download reliability
The default download library (urllib3) may fail on some servers. Installing pycurl gives Trafilatura an alternative:
wget or curl on the command-line as a workaround:
Falling back to the Internet Archive
Use--archived on the CLI to automatically retrieve a cached version from the Internet Archive when a direct download fails:
Downloads may fail because your IP address or user-agent is blocked. Trafilatura’s built-in download capabilities do not bypass such restrictions. For pages behind heavy anti-bot measures, consider browser automation (e.g. Playwright) or the nodriver / browserforge packages.
JavaScript-rendered and paywall-protected pages
Content injected by JavaScript
Trafilatura processes raw HTML and does not execute JavaScript. If a page relies on JavaScript to render its main content, the raw HTML will not contain the text you expect. The solution is to use a headless browser to render the page first, then pass the rendered HTML to Trafilatura. Browser automation libraries like Playwright can handle this. See the list of headless browsers for available alternatives. For more refined masking and automation methods, see the nodriver and browserforge packages.Bypassing paywalls
Browser automation can also help with cookie-based paywalls by combining a headless browser with a paywall-bypass browser extension.Encoding issues
Garbled or incorrectly decoded text
Trafilatura uses several heuristics to detect character encoding. Installfaust-cchardet for faster and more accurate detection — particularly important for non-Latin scripts (Asian languages, Arabic, etc.):
faust-cchardet if it is installed.
Manually decoding a file
Thedecode_file() utility handles byte-to-string conversion with encoding detection:
Date extraction issues
Date not found
If date extraction is failing, pass the URL as context — Trafilatura’shtmldate component can often extract a date directly from the URL path:
Enable extensive date search
For higher recall at the cost of some precision, enableextensive_search in date_extraction_params:
CLI not found after pip install
If you installed Trafilatura withpip but the trafilatura command is not found in your terminal, the user-level bin directory is likely not on your PATH.
On Linux / macOS:
~/.bashrc, ~/.zshrc, or equivalent shell configuration file to make it permanent.
Further reference:
- Python documentation: the user base directory
- Stack Overflow: pip installs packages but executables not found from command-line
Signal / timeout errors
If you see errors related to thesignal module when running Trafilatura (particularly in multi-threaded environments or on Windows), the extraction timeout is the cause.
EXTRACTION_TIMEOUT (default: 30 seconds) is active in CLI mode to prevent runaway CPU usage from malformed or adversarial input files. To disable it, set the value to 0 in settings.cfg: