What's New
This release resolves 6 open issues and introduces several community-requested features.
Fixed
- #7 β
UnicodeEncodeErroron non-ASCII content. All file writes now useencoding='utf-8'. - #8 β Bypass JavaScript checks. A browser-like
User-Agentheader is now sent on allrequests.getcalls. - #10 β
target_contentCSS selector handling. Nullhreflinks are now skipped inget_target_links. - #11 β
UnboundLocalErroringet_target_contentwhen no tags are found.main_contentis now initialized toNoneand checked beforestr()conversion.
Added
- #9 β
exclude_pathsparameter for URL filtering. Available incrawl(),get_target_links(),worker(),md_crawl(), and the CLI (-x/--exclude-paths). - #20 β Configurable
heading_stylefor markdownify (ATX,ATX_CLOSED,UNDERLINE,SETEXT). CLI flag:-s/--heading-style. - #17 β Proper
dependenciesinpyproject.toml(beautifulsoup4,markdownify,requests) enablinguvxsupport out of the box. - Comprehensive test suite β 60 tests with 95% coverage across
__init__.py(96%) andcli.py(88%). devoptional dependencies (pytest,pytest-cov) for contributors.
Changed
- Minimum Python version bumped to 3.8.
pyproject.tomlnow uses[project.scripts]instead of[tool.poetry.scripts].
Full changelog: https://github.com/paulpierre/markdown-crawler/blob/main/CHANGELOG.md