Install
naiymu / NHentai Konnichiwa

Published:

Version: 1.0.1+c27c868

Summary: A simple usercript for downloading doujinshi from NHentai and mirrors

Homepage: https://github.com/naiymu/nhentai-konnichiwa

Support: https://github.com/naiymu/nhentai-konnichiwa/issues

License: MIT; https://raw.githubusercontent.com/naiymu/nhentai-konnichiwa/main/LICENSE

NHentai Konnichiwa

A simple usercript for downloading galleries from NHentai and mirrors

Description

Userscript to download galleries from NHentai. It has features to be used with konnichiwa. NHentai started using Cloudflare protection and now you can't reliably download hentai with the download tab in konnichiwa. To make things easier for yourself if you use konnichiwa, you could use this userscript.

If you don't use konnichiwa, you can still use this without losing any functionality.

Supports only Tampermonkey and Violentmonkey.

Mirror sites can still break because of CloudFlare

Features

Checkboxes at the top left corner of every gallery on any page

On the individual gallery page.

On the homepage, search and similar pages.

On the recommendations section.

Buttons at the bottom-left corner of the page

  • Download button: Download all selected galleries. The Download button changes state depending on the stage of download.
    If the data is being fetched, it looks like this:

    If the data is being `downloaded`, it looks like this:

  • Config button: Change configuration options.

  • Check-all checkbox: Select all galleries on the page. Since there are checkboxes on the recommendation ("More like this"), if you check this on a gallery page, it's recommendations will get selected as well.

Configuration options

  • Domain to Use: Domain to be used for fetching images. There are three available options:

    • NET (from nhentai.net) default
    • COM (from nhentai.com)

    nhentai.net image download is quite slow. Using nhentai.com makes quite a difference in download time. The tradeoff is the extra fetching time. If you want the fetching time to be shorter and downloads to fail less often, use NET. If you want faster download speeds and can bear with failed downloads and longer fetching times, use COM.

    If an image/gallery does not exist on nhentai.com, nhentai.net is used as a fallback.

    On mirror sites, if the NET option is set, their own image links will be used instead of nhentai.net.

  • Download batch size: Number of downloads to run simultaneously.

    • Minimum: 1
    • Maximum: 50

    Default is 10. If you make it too high, a lot of downloads will fail.

  • Title format: The galleries are downloaded in their own separate directories. This option is for specifying the name of those directories. There are four available options:

    • pretty default
    • english
    • japanese
    • id
  • Filename to prepend: The text that gets added before every filename. If no value is specified, The default filename is {page}.{ext}.

  • Filename separator: The character to put between given filename (if any) and {page}. So, if this value is set to Underscore and the filename is set to myFileName, the files will be saved as myFileName_{page}.{ext}. There are three available options:

    • Space default
    • Hyphen
    • Underscore
  • Save JSON: This is mainly for use with konnichiwa. This outputs a file in the format specified here. There are three available options:

    • Don't save default
    • Save as JSON file
    • Copy to clipboard

    Save as JSON file will save the content to a file named with the number of milliseconds since January 1, 1970. You can then run refresh_db.php from konnichiwa on this file to add all the downloaded galleries to your database.

  • Include groups in authors: If the Save JSON option is set, the output has a key authors. This decides if the Groups in NHentai will be added to its value.

  • Button orientation: The three buttons (download, config and check-all) are by default aligned vertically. But if you want you can change this. There are two available options:

    • Vertical default
    • Horizontal
  • Clear and stop downloads: This probably needs a little explanation. The downloads are stored in the extension storage. Sometimes, if you reload a tab in between downloads, some files are not removed from the storage and the script tries to download them everytime a new tab in compatible sites is opened. You might need to click this if that happens. It's rare though.

Suggestions

While there are measures to continue downloads even after page switches/reloads, it is suggested to stay on the same page while a download is ongoing.

Supported sites

  • nhentai.net
  • nhentai.xxx
  • nyahentai.red
  • nhentai.to
  • nhentai.website

Rating: 0