Skip to content

anton1615/lrr-plugin-nhentai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

nHentai Downloader for LANraragi

A custom downloader plugin for LANraragi designed to fetch galleries from nHentai using image scraping techniques.

Features

  • Max-Quality Scraper: Built using Mojo::UserAgent with advanced browser emulation to fetch original, uncompressed images from i.nhentai.net.
  • Dual-mode Parsing: Implements both JSON metadata extraction and robust HTML scanning fallback to ensure 100% success rate even if the site layout changes.
  • In-plugin Packaging: Automatically downloads and packages images into a Deflate-compressed ZIP file for optimal storage and browsing performance.
  • Full Japanese Title: Automatically scrapes the complete Japanese title for precise file organization.
  • Session Sharing: Automatically shares Cookies (sessionid, cf_clearance) and User-Agent settings from the built-in nHentai Metadata plugin.
  • Cloudflare Friendly: Designed to work within the existing LRR browser session to minimize 503 errors.

Requirements

  • LANraragi v0.8.0 or higher.
  • Correct Cookies set in the nHentai Metadata Plugin configuration.

Installation

1. NixOS (Declarative via Flakes - Recommended)

The most elegant way to install this plugin is via Nix Flakes. This automates hash management.

Step 1: Add to your flake.nix inputs

inputs.lrr-plugin-nhentai = {
  url = "https://raw.githubusercontent.com/anton1615/lrr-plugin-nhentai/master/nHentai.pm";
  flake = false;
};

Step 2: Use in your LANraragi configuration

{ inputs, ... }:
{
  virtualisation.oci-containers.containers.lanraragi.volumes = [
    "${inputs.lrr-plugin-nhentai}:/home/koyomi/lanraragi/lib/LANraragi/Plugin/Download/nHentai.pm:ro"
  ];
}

Step 3: Update and Deploy

nix flake update lrr-plugin-nhentai
sudo nixos-rebuild switch --flake .

2. Traditional NixOS (fetchurl)

If you are not using Flakes, add the following to your configuration:

let
  nhentaiPlugin = pkgs.fetchurl {
    url = "https://raw.githubusercontent.com/anton1615/lrr-plugin-nhentai/master/nHentai.pm";
    sha256 = "sha256-QY15grutWsbKAY5s93F//gShkpEKmquEL7ZXKDTS+Hk=";
  };
in {
  virtualisation.oci-containers.containers.lanraragi.volumes = [
    "${nhentaiPlugin}:/home/koyomi/lanraragi/lib/LANraragi/Plugin/Download/nHentai.pm:ro"
  ];
}

3. Manual Installation

  1. Download nHentai.pm from this repository.
  2. Place it in the /lib/LANraragi/Plugin/Download/ directory of your LANraragi installation.
  3. Restart LANraragi.
  4. Enable the plugin via Configuration -> Plugins -> Downloader Plugins.

Technical Details

  • Developer: Code automatically generated and optimized by Gemini CLI Agent.
  • Test Environment: NixOS 25.11, LANraragi 0.9.60 (Docker).
  • Logic: Parses the gallery index to extract Media ID and total pages, then generates direct image URLs for LRR's internal downloader.

License

Licensed under the MIT License.


Generated by Gemini CLI Agent

About

A custom downloader plugin for LANraragi designed to fetch galleries from nHentai using image scraping techniques.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages