7 _ __ | | | | ___ _ __ | |_ __ _(_)
8 | '_ \| |_| |/ _ \ '_ \| __/ _` | |
9 | | | | _ | __/ | | | || (_| | |
10 |_| |_|_| |_|\___|_| |_|\__\__,_|_|
20 nHentai is a CLI tool for downloading doujinshi from <http://nhentai.net>
27 git clone https://github.com/RicterZ/nhentai
29 python setup.py install
34 Alternatively, install from PyPI with pip
39 For a self-contained installation, use _Pipx:
50 sudo emerge net-misc/nhentai
55 **IMPORTANT**: To bypass the nhentai frequency limit, you should use `--cookie` option to store your cookie.
57 *The default download folder will be the path where you run the command (CLI path).*
60 Set your nhentai cookie against captcha:
64 nhentai --cookie "YOUR COOKIE FROM nhentai.net"
66 Download specified doujinshi:
70 nhentai --id=123855,123866
72 Download doujinshi with ids specified in a file (doujinshi ids split by line):
76 nhentai --file=doujinshi.txt
78 Search a keyword and download the first page:
82 nhentai --search="tomori" --page=1 --download
88 nhentai --tag lolicon --download --page=2
94 nhentai --language english --download --page=2
96 Download by artist name:
100 nhentai --artist henreader --download
102 Download by character name:
106 nhentai --character "kuro von einsbern" --download
108 Download by parody name:
112 nhentai --parody "the idolmaster" --download
114 Download by group name:
118 nhentai --group clesta --download
120 Download using multiple tags (--tag, --character, --paordy and --group supported):
124 nhentai --tag "lolicon, teasing" --artist "tamano kedama, atte nanakusa"
126 Download your favorites with delay:
130 nhentai --favorites --download --delay 1
132 Format output doujinshi folder name:
136 nhentai --id 261100 --format '[%i]%s'
138 Supported doujinshi folder formatter:
142 - %s: Doujinshi subtitle (translated name)
143 - %a: Doujinshi authors' name
152 -h, --help show this help message and exit
153 -D, --download download doujinshi (for search results)
154 -S, --show just show the doujinshi information
157 --id=ID doujinshi ids set, e.g. 1,2,3
158 -s KEYWORD, --search=KEYWORD
159 search doujinshi by keyword
160 --tag=TAG download doujinshi by tag
161 -F, --favorites list or download your favorites.
164 --page=PAGE page number of search results
165 --max-page=MAX_PAGE The max page when recursive download tagged doujinshi
168 -o OUTPUT_DIR, --output=OUTPUT_DIR
170 -t THREADS, --threads=THREADS
171 thread count for downloading doujinshi
172 -T TIMEOUT, --timeout=TIMEOUT
173 timeout for downloading doujinshi
174 -d DELAY, --delay=DELAY
175 slow down between downloading every doujinshi
176 -p PROXY, --proxy=PROXY
177 uses a proxy, for example: http://127.0.0.1:1080
178 -f FILE, --file=FILE read gallery IDs from file.
179 --format=NAME_FORMAT format the saved folder name
182 --html generate a html viewer at current directory
183 --no-html don't generate HTML after downloading
184 --gen-main generate a main viewer contain all the doujin in the folder
185 -C, --cbz generate Comic Book CBZ File
186 --rm-origin-dir remove downloaded doujinshi dir when generated CBZ
190 --cookie=COOKIE set cookie of nhentai to bypass Google recaptcha
196 If you want to use a mirror, you should set up a reverse proxy of `nhentai.net` and `i.nhentai.net`.
201 i.h.loli.club -> i.nhentai.net
202 h.loli.club -> nhentai.net
204 Set `NHENTAI` env var to your nhentai mirror.
208 NHENTAI=http://h.loli.club nhentai --id 123456
211 .. image:: ./images/search.png?raw=true
214 .. image:: ./images/download.png?raw=true
217 .. image:: ./images/viewer.png?raw=true
224 .. image:: ./images/image.jpg?raw=true
230 .. |travis| image:: https://travis-ci.org/RicterZ/nhentai.svg?branch=master
231 :target: https://travis-ci.org/RicterZ/nhentai
233 .. |pypi| image:: https://img.shields.io/pypi/dm/nhentai.svg
234 :target: https://pypi.org/project/nhentai/
236 .. |license| image:: https://img.shields.io/github/license/ricterz/nhentai.svg
237 :target: https://github.com/RicterZ/nhentai/blob/master/LICENSE
238 .. _Pipx: https://github.com/pipxproject/pipx/