symant233 / nhentai

πŸ±β€πŸ‘€Forked for contributions, all my pull requests turn to the link behind:

Home Page:https://github.com/RicterZ/nhentai/pulls?utf8=βœ“&q=author%3Asymant233

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nhentai

_   _            _        _

_ __ | | | | ___ _ __ | |_ __ _(_)

'_ | |
| | | _ | __/ | | | || (_| | |

_| ___ ____,_

あγͺγŸγ‚‚ε€‰ζ…‹γ€‚ いいね?

travis pypi license

nHentai is a CLI tool for downloading doujinshi from <http://nhentai.net>

Manual Installation

git clone https://github.com/RicterZ/nhentai
cd nhentai
python setup.py install

Installation (pip)

Alternatively, install from PyPI with pip:

pip install nhentai

For a self-contained installation, use Pipx:

pipx install nhentai

Installation (Gentoo)

layman -fa glicOne
sudo emerge net-misc/nhentai

Usage

IMPORTANT: To bypass the nhentai frequency limit, you should use --cookie option to store your cookie.

The default download folder will be the path where you run the command (CLI path).

Set your nhentai cookie against captcha:

nhentai --cookie "YOUR COOKIE FROM nhentai.net"

NOTE: The format of the cookie is "csrftoken=TOKEN; sessionid=ID"

Download specified doujinshi:

nhentai --id=123855,123866

Download doujinshi with ids specified in a file (doujinshi ids split by line):

nhentai --file=doujinshi.txt

Set search default language

nhentai --language=english

Search a keyword and download the first page:

nhentai --search="tomori" --page=1 --download
# you also can download by tags and multiple keywords
nhentai --search="tag:lolicon, artist:henreader, tag:full color"
nhentai --search="lolicon, henreader, full color"

Download your favorites with delay:

nhentai --favorites --download --delay 1

Format output doujinshi folder name:

nhentai --id 261100 --format '[%i]%s'

Supported doujinshi folder formatter:

  • %i: Doujinshi id
  • %t: Doujinshi name
  • %s: Doujinshi subtitle (translated name)
  • %a: Doujinshi authors' name

Other options:

Options:
  # Operation options
  -h, --help            show this help message and exit
  -D, --download        download doujinshi (for search results)
  -S, --show            just show the doujinshi information

  # Doujinshi options
  --id=ID               doujinshi ids set, e.g. 1,2,3
  -s KEYWORD, --search=KEYWORD
                        search doujinshi by keyword
  --tag=TAG             download doujinshi by tag
  -F, --favorites       list or download your favorites.

  # Multi-page options
  --page=PAGE           page number of search results
  --max-page=MAX_PAGE   The max page when recursive download tagged doujinshi

  # Download options
  -o OUTPUT_DIR, --output=OUTPUT_DIR
                        output dir
  -t THREADS, --threads=THREADS
                        thread count for downloading doujinshi
  -T TIMEOUT, --timeout=TIMEOUT
                        timeout for downloading doujinshi
  -d DELAY, --delay=DELAY
                        slow down between downloading every doujinshi
  -p PROXY, --proxy=PROXY
                        uses a proxy, for example: http://127.0.0.1:1080
  -f FILE, --file=FILE  read gallery IDs from file.
  --format=NAME_FORMAT  format the saved folder name

  # Generating options
  --html                generate a html viewer at current directory
  --no-html             don't generate HTML after downloading
  --gen-main            generate a main viewer contain all the doujin in the folder
  -C, --cbz             generate Comic Book CBZ File
  -P --pdf              generate PDF file
  --rm-origin-dir       remove downloaded doujinshi dir when generated CBZ
                        or PDF file.

  # nHentai options
  --cookie=COOKIE       set cookie of nhentai to bypass Google recaptcha

nHentai Mirror

If you want to use a mirror, you should set up a reverse proxy of nhentai.net and i.nhentai.net. For example:

i.h.loli.club -> i.nhentai.net
h.loli.club -> nhentai.net

Set NHENTAI env var to your nhentai mirror.

NHENTAI=http://h.loli.club nhentai --id 123456

nhentai

nhentai

nhentai

あγͺγŸγ‚‚ε€‰ζ…‹

nhentai

About

πŸ±β€πŸ‘€Forked for contributions, all my pull requests turn to the link behind:

https://github.com/RicterZ/nhentai/pulls?utf8=βœ“&q=author%3Asymant233

License:MIT License


Languages

Language:Python 85.4%Language:CSS 9.5%Language:JavaScript 3.4%Language:HTML 1.7%