import{NHentai,NHSort}from'nhentai.js-api';// orconst{ NHentai, NHSort }=require('nhentai.js-api');constapi=newNHentai();// Get a hentai from a URLconsthentai=awaitapi.hentai('https://nhentai.net/g/101010');// Get a hentai from an idconsthentai=awaitapi.hentai(101010);// Get a random hentaiconsthentai=awaitapi.random(false);// Get a random english hentaiconsthentai=awaitapi.random(true);// Search for hentaiconstresults=awaitapi.search('catgirl',NHSort.all_time);if(results.total>0){// 25 hentai maxfor(consthentaiofresult.hentai){console.log(hentai.title,hentai.id,hentai.url,hentai.cover,hentai.language);if(hentai.language==='english'){constfullHentai=awaithentai.fetch();console.log(fullHentai.images);}}// next pageawaitresults.next();}
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.