doujinshi-dl
あなたも変態。 いいね?
doujinshi-dl is a CLI tool for downloading doujinshi from mirror sites.
Manual Installation
From Github:
git clone https://github.com/RicterZ/doujinshi-dl
cd doujinshi-dl
pip install --no-cache-dir .
Build Docker container:
git clone https://github.com/RicterZ/doujinshi-dl
cd doujinshi-dl
docker build -t doujinshi-dl:latest .
docker run --rm -it -v ~/Downloads/doujinshi:/output doujinshi-dl --id 123855
Installation
From PyPI with pip:
pip install doujinshi-dl
Install a plugin to connect to a mirror site:
pip install doujinshi-dl-<plugin-name>
For a self-contained installation, use pipx:
pipx install doujinshi-dl
Usage
⚠️IMPORTANT⚠️: Authentication is required. Get your API token from your account settings page and save it:
doujinshi-dl --token "YOUR_API_TOKEN"
The default download folder will be the path where you run the command (%cd% or $PWD).
Download specified doujinshi:
doujinshi-dl --id 123855 123866 123877
Download doujinshi with ids specified in a file (doujinshi ids split by line):
doujinshi-dl --file=doujinshi.txt
Set search default language:
doujinshi-dl --language=english
Search a keyword and download the first page:
doujinshi-dl --search="tomori" --page=1 --download
# you also can download by tags and multiple keywords
doujinshi-dl --search="tag:lolicon, artist:henreader, tag:full color"
doujinshi-dl --search="lolicon, henreader, full color"
Download your favorites with delay:
doujinshi-dl --favorites --download --delay 1 --page 3-5,7
Format output doujinshi folder name:
doujinshi-dl --id 261100 --format '[%i]%s'
# for Windows
doujinshi-dl --id 261100 --format "[%%i]%%s"
Supported doujinshi folder formatter:
%i: Doujinshi id
%f: Doujinshi favorite count
%t: Doujinshi name
%s: Doujinshi subtitle (translated name)
%a: Doujinshi authors’ name
%g: Doujinshi groups name
%p: Doujinshi pretty name
%ag: Doujinshi authors name or groups name
Note: for Windows operation system, please use double “%”, such as “%%i”.
Other options:
Usage:
doujinshi-dl --search [keyword] --download
DOUJINSHI_DL_URL=https://mirror-url/ doujinshi-dl --id [ID ...]
doujinshi-dl --file [filename]
Environment Variable:
DOUJINSHI_DL_URL mirror url
Options:
-h, --help show this help message and exit
--download, -D download doujinshi (for search results)
--no-download skip downloading (for search results)
--show, -S just show the doujinshi information
--id ID [ID ...] doujinshi ids set, e.g. 167680 167681 167682
--search, -s KEYWORD search doujinshi by keyword
--favorites, -F list or download your favorites
--artist, -a ARTIST list doujinshi by artist name
--page-all all search results
--page, --page-range PAGE
page number of search results. e.g. 1,2-5,14
--sorting, --sort {recent,popular,popular-today,popular-week,date}
sorting of doujinshi (recent / popular / popular-[today|week])
--output, -o OUTPUT_DIR
output dir
--threads, -t THREADS
thread count for downloading doujinshi
--timeout, -T TIMEOUT
timeout for downloading doujinshi
--delay, -d DELAY slow down between downloading every doujinshi
--retry RETRY retry times when downloading failed
--exit-on-fail exit on fail to prevent generating incomplete files
--proxy PROXY store a proxy, for example: -p "http://127.0.0.1:1080"
--file, -f FILE read gallery IDs from file.
--format NAME_FORMAT format the saved folder name
--no-filename-padding
no padding in the images filename, such as '001.jpg'
--html [HTML_VIEWER] generate an HTML viewer in the specified directory, or
scan all subfolders within the entire directory to
generate the HTML viewer. By default, current working
directory is used.
--no-html don't generate HTML after downloading
--gen-main generate a main viewer contain all the doujin in the folder
--cbz, -C generate Comic Book CBZ File
--pdf, -P generate PDF file
--meta generate a metadata file in doujinshi format
--update-meta update the metadata file of a doujinshi, update CBZ
metadata if exists
--rm-origin-dir remove downloaded doujinshi dir when generated CBZ or PDF file
--move-to-folder remove files in doujinshi dir then move new file to
folder when generated CBZ or PDF file
--regenerate regenerate the cbz or pdf file if exists
--zip package into a single zip file
--token TOKEN set API token for authentication
--language LANGUAGE set default language to parse doujinshis
--clean-language set DEFAULT as language to parse doujinshis
--save-download-history
save downloaded doujinshis, whose will be skipped if
you re-download them
--clean-download-history
clean download history
--template VIEWER_TEMPLATE
set viewer template
Mirror
To use a mirror, set the DOUJINSHI_DL_URL environment variable to your mirror’s base URL.
DOUJINSHI_DL_URL=https://your-mirror.example.com doujinshi-dl --id 123456
Metadata
Release files for doujinshi-dl 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| doujinshi_dl-2.1.0.tar.gz | 51.0 kB | Without provenance | Details for doujinshi_dl-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| doujinshi_dl-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for doujinshi_dl-2.1.0-py3-none-any.whl |
Total release size: 112.9 kB
Release files / doujinshi_dl-2.1.0.tar.gz
| Download URL | doujinshi_dl-2.1.0.tar.gz |
|---|---|
| Size | 51.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84a7d9277082119c0c7ca996a13baac6878436b99bbf9d3e54456536d6c55000
|
|
BLAKE2b-256 checksum How to use checksums |
65ce99db2f3983bac75c20e3d5e0bbc3300bb4a515ec202d3c08688b28f6d713
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.6
|
Release files / doujinshi_dl-2.1.0-py3-none-any.whl
| Download URL | doujinshi_dl-2.1.0-py3-none-any.whl |
|---|---|
| Size | 61.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c5fe229a6f49c66bc5767a2d2f51877ae888f7b2a52dac79dd0e2ddc5ceb282
|
|
BLAKE2b-256 checksum How to use checksums |
5347e0f3d05a842edc24e15f2108661d594aea9d54914155fce193504fcd1f5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.6
|
Security for doujinshi-dl 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.