1.0.1 • Published 5 months ago

hentairead-js v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

hentairead-js

About

hentairead-js is a simple node package to scrape https://hentairead.com. It utilizes node-fetch and cheerio. It was made because many nhentai packages stopped working due to cloudflare issues.

Features

  • Scrape pages quickly and easily
  • Fully asynchronous
  • Supports most actions reading-wise

Installation

$ npm i hentairead-js

Usage

MethodDescription
searchPageScrape a page and return all the doujins listed on that page
searchSearch for a specific doujin with many parameters
existsCheck whether a doujin exists or not
topGet the top doujins based off of the provided range
getInfoGet the info of a specific doujin
getPagesGet all the pages of a specific doujin
searchIndexSearch through a specific index with a specific query
getHomeGet the doujins displayed on the home page
getAllGet a list of all doujins
getRandomGet a random doujin

Examples

// index.js
const HentaiRead = require("hentairead-js");
// or alternatively:
// import HentaiRead from "hentairead-js";

(async () => {
  // search for the first page of all doujins that have the word "neko"
  console.log(await HentaiRead.search({ s: "neko", page: 1 }));

  // get pages for a specific doujin
  console.log(await HentaiRead.getPages("boku-no-risou-no-isekai-seikatsu-4-decensored"));
})();

Troubleshooting

ProblemAnswer
What parameters does the search method accept?The search method accepts anything as a parameter, because of all the possible variations of searches. While it can't check if something is valid or not, it will throw an error if a 404 is found. For a list of all accepted parameters, you can look at the query parameters found here (click advanced).
Why do I get a timeout error? / Why does it keep on hanging?Try checking your internet connection to make sure it's stable.
Does this support synchronous functions?No, everything is fully asynchronous
Does this support both CJS and ESM?Yes, both work with this package

Contributing

If you would like to contribute, you can fork the repo and make a PR, or contact me via email @ suggestions@firestreaker2.gq

License

MIT

1.0.1

5 months ago

1.0.0

5 months ago