A custom downloader plugin for LANraragi designed to fetch galleries from nHentai using image scraping techniques.
- Max-Quality Scraper: Built using
Mojo::UserAgentwith advanced browser emulation to fetch original, uncompressed images fromi.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.
- LANraragi v0.8.0 or higher.
- Correct Cookies set in the nHentai Metadata Plugin configuration.
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 .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"
];
}- Download
nHentai.pmfrom this repository. - Place it in the
/lib/LANraragi/Plugin/Download/directory of your LANraragi installation. - Restart LANraragi.
- Enable the plugin via Configuration -> Plugins -> Downloader Plugins.
- 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.
Licensed under the MIT License.
Generated by Gemini CLI Agent