trafilatura
A Python tool for web scraping and crawling that extracts main text, metadata, and comments from web pages. tldr-pages
On several platforms
Several platforms
A Python tool for web scraping and crawling that extracts main text, metadata, and comments from web pages. Designed for creating text corpora and extracting structured content.
Extract text from a URL
trafilatura --URL urlIdentifyExtract text and save to a file
trafilatura --URL url --output-dir path/to/output.txtIdentifyExtract text in JSON format
trafilatura --URL url --jsonIdentifyExtract text from multiple URLs listed in a file
trafilatura --input-file path/to/url_list.txtIdentifyCrawl a website using its sitemap
trafilatura --sitemap url_to_sitemap.xmlIdentifyExtract text while preserving HTML formatting
trafilatura --URL url --formattingIdentifyExtract text including comments
trafilatura --URL url --with-commentsIdentifyDisplay help
trafilatura --helpIdentify