This project downloads manga chapter images and can optionally package each
chapter into a .cbz archive.
This script is intended for archival/offline reading use cases (for example, downloading chapters before a flight). Users are responsible for complying with Fanfox Terms of Service.
The script is now maintained as a Python 3.11+ project with linting, type checking, tests, and pre-commit hooks.
- Python 3.11+
beautifulsoup4
Mandatory argument:
-m,--manga <Manga Name>
Optional arguments:
-s,--start <chapter>start chapter (float supported)-e,--end <chapter>end chapter (float supported)-c,--cbzcreate CBZ archive after download-r,--removeremove image files after CBZ creation-f,--forceredownload chapters even when matching.cbzfiles already exist-l,--listlist chapter numbers and exit-d,--debugshow HTTP request debug output--profile <safe|balanced|aggressive>performance profile (default:safe)--workers <count>concurrent image downloads (overrides profile)--delay <seconds>average delay between retry attempts (overrides profile)--max-retries <count>max retries per image download (overrides profile)
Examples:
python3 mfdl.py -m "The World God Only Knows"
python3 mfdl.py -m "The World God Only Knows" -s 222.5 -e 222.5
python3 mfdl.py -m "The World God Only Knows" -s 190 -e 205 -c -r
python3 mfdl.py -m "One Piece" -c -r --force
python3 mfdl.py -m "The World God Only Knows" --list
python3 mfdl.py -m "One Piece" --profile balanced -c -rInstall dev dependencies:
uv sync --extra devRun quality checks directly:
uv run ruff check .
uv run ruff format .
uv run prek run markdownlint --all-files
uv run ty check mfdl.py tests
uv run pytest -qThis repository uses .pre-commit-config.yaml and is intended to be executed
with prek.
uv run prek install
uv run prek run --all-filespytest is configured on the pre-push stage to keep normal commits fast.