Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

IchimakiKasura/kasu.nhentaiapi.js

Repository files navigation

N-hentai API

unstable Downloads Build Status Snyk Vulnerabilities for npm package minified
lol
kasu.nhentaiapi.js

[PROJECT IS NOW DISCONTINUED]

Since I notice how my scraping code took too long to load
the Nhentai website now checks for the browser to check if its a bot or not
and I am not gonna work with this anymore.

Thank you all who used this package!

kinda funny how the dev says it. Well I can actually bypass it but will take more processe/time to fetch which kinda could be shit when used on some discord bots.


The "N-hentai-api" is a fast and easy to use api for connecting to nhentai.net and nhentai.to data.

  • Fast*
  • Easy to use
  • Reliable* :>
  • Discord friendly?

Install

To install "N-hentai-api" type these:

npm i kasu.nhentaiapi.js

Examples

How to use n-hentai-api

To get the basic info about the ID/Doujin:

const Example = require('kasu.nhentaiapi.js');
const ExampleApi = new Example();
/**
 * or const ExampleApi = new Example('start', "https://nhentai.net");
 * If you don't want to add the url and connection.start() after it.
 * because it automatically start the connection.
 * 
 * Check the documentation or the homepage for more info.
*/

//          ----number | strings can do----
const ID = 228922 //or "228922" or "https://nhentai.net/g/228922"
async function json(){

    // start the connection
    ExampleApi.url = "https://nhentai.net"
    ExampleApi.connection.start()

    const val = await ExampleApi.getID(ID).json()
    val.url
    // OR
    ExampleApi.getID(ID).json(data=>{data.url})
    // OR
    (await ExampleApi.getID(ID).json()).url
    // result: https://nhentai.net/g/228922/

    // closes the connection
    ExampleApi.connection.close()
}

For CLI

How to run:

nhentai 228922 

check the changelogs for more info


C# port new

C# of this project's parser is now available in beta. click here to go there.


(≧▽≦*) Other Informations (≧▽≦*)





embed


Enjoy using it! crediting me will be an appreciation!
Star it if you like it!