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 Set search default language
86 nhentai --language=english
88 Search a keyword and download the first page:
92 nhentai --search="tomori" --page=1 --download
93 # you also can download by tags and multiple keywords
94 nhentai --search="tag:lolicon, artist:henreader, tag:full color"
95 nhentai --search="lolicon, henreader, full color"
97 Download your favorites with delay:
101 nhentai --favorites --download --delay 1
103 Format output doujinshi folder name:
107 nhentai --id 261100 --format '[%i]%s'
109 Supported doujinshi folder formatter:
113 - %s: Doujinshi subtitle (translated name)
114 - %a: Doujinshi authors' name
123 -h, --help show this help message and exit
124 -D, --download download doujinshi (for search results)
125 -S, --show just show the doujinshi information
128 --id=ID doujinshi ids set, e.g. 1,2,3
129 -s KEYWORD, --search=KEYWORD
130 search doujinshi by keyword
131 --tag=TAG download doujinshi by tag
132 -F, --favorites list or download your favorites.
135 --page=PAGE page number of search results
136 --max-page=MAX_PAGE The max page when recursive download tagged doujinshi
139 -o OUTPUT_DIR, --output=OUTPUT_DIR
141 -t THREADS, --threads=THREADS
142 thread count for downloading doujinshi
143 -T TIMEOUT, --timeout=TIMEOUT
144 timeout for downloading doujinshi
145 -d DELAY, --delay=DELAY
146 slow down between downloading every doujinshi
147 -p PROXY, --proxy=PROXY
148 uses a proxy, for example: http://127.0.0.1:1080
149 -f FILE, --file=FILE read gallery IDs from file.
150 --format=NAME_FORMAT format the saved folder name
153 --html generate a html viewer at current directory
154 --no-html don't generate HTML after downloading
155 --gen-main generate a main viewer contain all the doujin in the folder
156 -C, --cbz generate Comic Book CBZ File
157 -P --pdf generate PDF file
158 --rm-origin-dir remove downloaded doujinshi dir when generated CBZ
162 --cookie=COOKIE set cookie of nhentai to bypass Google recaptcha
168 If you want to use a mirror, you should set up a reverse proxy of `nhentai.net` and `i.nhentai.net`.
173 i.h.loli.club -> i.nhentai.net
174 h.loli.club -> nhentai.net
176 Set `NHENTAI` env var to your nhentai mirror.
180 NHENTAI=http://h.loli.club nhentai --id 123456
183 .. image:: ./images/search.png?raw=true
186 .. image:: ./images/download.png?raw=true
189 .. image:: ./images/viewer.png?raw=true
196 .. image:: ./images/image.jpg?raw=true
202 .. |travis| image:: https://travis-ci.org/RicterZ/nhentai.svg?branch=master
203 :target: https://travis-ci.org/RicterZ/nhentai
205 .. |pypi| image:: https://img.shields.io/pypi/dm/nhentai.svg
206 :target: https://pypi.org/project/nhentai/
208 .. |license| image:: https://img.shields.io/github/license/ricterz/nhentai.svg
209 :target: https://github.com/RicterZ/nhentai/blob/master/LICENSE