courlan — URL Filtering and Normalization for Python¶
courlan provides an additional “brain” for web crawling, scraping, and document management. It facilitates web navigation through a set of filters to enhance the quality of resulting document collections: save bandwidth by steering clear of low-value pages, identify content by language, and deduplicate URL collections at scale.
Common tasks¶
check_url — validate, normalize, and filter in one call.
clean_url, normalize_url — fix up messy URLs without full filtering.
extract_links, filter_links — general-purpose and crawl-aware extraction.
sample_urls — pick N URLs per domain from a larger collection.
UrlStore — domain-classified storage with visit tracking and persistence.
Crawl delays, robots.txt, download scheduling, and frontier management.
courlan CLI — filter and sample URL files from the terminal.
Customize blacklists, allowed parameters, and language rules.