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
37 sudo emerge net-misc/nhentai
42 **IMPORTANT**: To bypass the nhentai frequency limit, you should use `--cookie` option to store your cookie.
44 *The default download folder will be the path where you run the command (CLI path).*
47 Set your nhentai cookie against captcha:
51 nhentai --cookie "YOUR COOKIE FROM nhentai.net"
53 Download specified doujinshi:
57 nhentai --id=123855,123866
59 Download doujinshi with ids specified in a file (doujinshi ids split by line):
63 nhentai --file=doujinshi.txt
65 Search a keyword and download the first page:
69 nhentai --search="tomori" --page=1 --download
75 nhentai --tag lolicon --download --page=2
81 nhentai --language english --download --page=2
83 Download by artist name:
87 nhentai --artist henreader --download
89 Download by character name:
93 nhentai --character "kuro von einsbern" --download
95 Download by parody name:
99 nhentai --parody "the idolmaster" --download
101 Download by group name:
105 nhentai --group clesta --download
107 Download using multiple tags (--tag, --character, --paordy and --group supported):
111 nhentai --tag "lolicon, teasing" --artist "tamano kedama, atte nanakusa"
113 Download your favorites with delay:
117 nhentai --favorites --download --delay 1
119 Format output doujinshi folder name:
123 nhentai --id 261100 --format '[%i]%s'
125 Supported doujinshi folder formatter:
129 - %s: Doujinshi subtitle (translated name)
130 - %a: Doujinshi authors' name
139 -h, --help show this help message and exit
140 -D, --download download doujinshi (for search results)
141 -S, --show just show the doujinshi information
144 --id=ID doujinshi ids set, e.g. 1,2,3
145 -s KEYWORD, --search=KEYWORD
146 search doujinshi by keyword
147 --tag=TAG download doujinshi by tag
148 -F, --favorites list or download your favorites.
151 --page=PAGE page number of search results
152 --max-page=MAX_PAGE The max page when recursive download tagged doujinshi
155 -o OUTPUT_DIR, --output=OUTPUT_DIR
157 -t THREADS, --threads=THREADS
158 thread count for downloading doujinshi
159 -T TIMEOUT, --timeout=TIMEOUT
160 timeout for downloading doujinshi
161 -d DELAY, --delay=DELAY
162 slow down between downloading every doujinshi
163 -p PROXY, --proxy=PROXY
164 uses a proxy, for example: http://127.0.0.1:1080
165 -f FILE, --file=FILE read gallery IDs from file.
166 --format=NAME_FORMAT format the saved folder name
169 --html generate a html viewer at current directory
170 --no-html don't generate HTML after downloading
171 --gen-main generate a main viewer contain all the doujin in the folder
172 -C, --cbz generate Comic Book CBZ File
173 --rm-origin-dir remove downloaded doujinshi dir when generated CBZ
177 --cookie=COOKIE set cookie of nhentai to bypass Google recaptcha
183 If you want to use a mirror, you should set up a reverse proxy of `nhentai.net` and `i.nhentai.net`.
188 i.h.loli.club -> i.nhentai.net
189 h.loli.club -> nhentai.net
191 Set `NHENTAI` env var to your nhentai mirror.
195 NHENTAI=http://h.loli.club nhentai --id 123456
198 .. image:: ./images/search.png?raw=true
201 .. image:: ./images/download.png?raw=true
204 .. image:: ./images/viewer.png?raw=true
211 .. image:: ./images/image.jpg?raw=true
217 .. |travis| image:: https://travis-ci.org/RicterZ/nhentai.svg?branch=master
218 :target: https://travis-ci.org/RicterZ/nhentai
220 .. |pypi| image:: https://img.shields.io/pypi/dm/nhentai.svg
221 :target: https://pypi.org/project/nhentai/
223 .. |license| image:: https://img.shields.io/github/license/ricterz/nhentai.svg
224 :target: https://github.com/RicterZ/nhentai/blob/master/LICENSE