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:
40 For a self-contained installation, use `Pipx <https://github.com/pipxproject/pipx/>`_:
52 sudo emerge net-misc/nhentai
57 **IMPORTANT**: To bypass the nhentai frequency limit, you should use `--cookie` option to store your cookie.
59 *The default download folder will be the path where you run the command (CLI path).*
62 Set your nhentai cookie against captcha:
66 nhentai --cookie "YOUR COOKIE FROM nhentai.net"
68 **NOTE**: The format of the cookie is `"csrftoken=TOKEN; sessionid=ID"`
70 Download specified doujinshi:
74 nhentai --id=123855,123866
76 Download doujinshi with ids specified in a file (doujinshi ids split by line):
80 nhentai --file=doujinshi.txt
82 Search a keyword and download the first page:
86 nhentai --search="tomori" --page=1 --download
92 nhentai --tag lolicon --download --page=2
98 nhentai --language english --download --page=2
100 Download by artist name:
104 nhentai --artist henreader --download
106 Download by character name:
110 nhentai --character "kuro von einsbern" --download
112 Download by parody name:
116 nhentai --parody "the idolmaster" --download
118 Download by group name:
122 nhentai --group clesta --download
124 Download using multiple tags (--tag, --character, --paordy and --group supported):
128 nhentai --tag "lolicon, teasing" --artist "tamano kedama, atte nanakusa"
130 Download your favorites with delay:
134 nhentai --favorites --download --delay 1
136 Format output doujinshi folder name:
140 nhentai --id 261100 --format '[%i]%s'
142 Supported doujinshi folder formatter:
146 - %s: Doujinshi subtitle (translated name)
147 - %a: Doujinshi authors' name
156 -h, --help show this help message and exit
157 -D, --download download doujinshi (for search results)
158 -S, --show just show the doujinshi information
161 --id=ID doujinshi ids set, e.g. 1,2,3
162 -s KEYWORD, --search=KEYWORD
163 search doujinshi by keyword
164 --tag=TAG download doujinshi by tag
165 -F, --favorites list or download your favorites.
168 --page=PAGE page number of search results
169 --max-page=MAX_PAGE The max page when recursive download tagged doujinshi
172 -o OUTPUT_DIR, --output=OUTPUT_DIR
174 -t THREADS, --threads=THREADS
175 thread count for downloading doujinshi
176 -T TIMEOUT, --timeout=TIMEOUT
177 timeout for downloading doujinshi
178 -d DELAY, --delay=DELAY
179 slow down between downloading every doujinshi
180 -p PROXY, --proxy=PROXY
181 uses a proxy, for example: http://127.0.0.1:1080
182 -f FILE, --file=FILE read gallery IDs from file.
183 --format=NAME_FORMAT format the saved folder name
186 --html generate a html viewer at current directory
187 --no-html don't generate HTML after downloading
188 --gen-main generate a main viewer contain all the doujin in the folder
189 -C, --cbz generate Comic Book CBZ File
190 --rm-origin-dir remove downloaded doujinshi dir when generated CBZ
194 --cookie=COOKIE set cookie of nhentai to bypass Google recaptcha
200 If you want to use a mirror, you should set up a reverse proxy of `nhentai.net` and `i.nhentai.net`.
205 i.h.loli.club -> i.nhentai.net
206 h.loli.club -> nhentai.net
208 Set `NHENTAI` env var to your nhentai mirror.
212 NHENTAI=http://h.loli.club nhentai --id 123456
215 .. image:: ./images/search.png?raw=true
218 .. image:: ./images/download.png?raw=true
221 .. image:: ./images/viewer.png?raw=true
228 .. image:: ./images/image.jpg?raw=true
234 .. |travis| image:: https://travis-ci.org/RicterZ/nhentai.svg?branch=master
235 :target: https://travis-ci.org/RicterZ/nhentai
237 .. |pypi| image:: https://img.shields.io/pypi/dm/nhentai.svg
238 :target: https://pypi.org/project/nhentai/
240 .. |license| image:: https://img.shields.io/github/license/ricterz/nhentai.svg
241 :target: https://github.com/RicterZ/nhentai/blob/master/LICENSE