Skip to main content
Home

@leaf/e-hentai@2024.12.19
Built and signed on GitHub Actions

A tool to retrieve tags that are blocked by the e-hentai

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
a year ago (2024.12.19)

一个用来以编程的方式检索 e-hentai 指定 tag (包括一些被屏蔽的 tag) 的内容的基础数据的工具, 基于 puppeteer, 用 TypeScript 编写. 完整配置见 https://jsr.io/@leaf/e-hentai/doc.

A tool for retrieving basic data of e-hentai content with specified tag (including some banned tag) programmatically,

JSR Version JSR Scope JSR Score

  • MacOS 用户请提前安装 Chrome 浏览器, Windows 请手动指定 chromePath (可以用自带的 Edge 浏览器).
  • MacOS users please install Chrome browser in advance, Windows users please specify chromePath manually (you can use the built-in Edge browser).
# 安装
# Install
npx jsr add @leaf/e-hentai # if using npm
bunx jsr add @leaf/e-hentai # if using bun
deno add jsr:@leaf/e-hentai # if using deno
pnpm dlx jsr add @leaf/e-hentai # if using pnpm
yarn dlx jsr add @leaf/e-hentai # if using yarn
import { search } from '@leaf/e-hentai'
import { resolve } from 'node:path'
import { readFile } from 'node:fs/promises'

// Search for 2 most recent items
const a = await search(2)
console.log(a.result)

// Search for 2 most recent items with tags 'other:full color' and 'language:chinese'
const b = await search(2, {
  baseTags: ['other:full color', 'language:chinese'],
})
console.log(b.result)

// Search for 2 most recent items and save the result to result_1.json
await search(2, { resultDist: resolve(import.meta.dirname!, 'result_1.json') })

// Search for 2 most recent items with banned tag 'male:shotacon'
// and provide existing items to skip
// Save the result to result_2.json
await search(2, {
  extraTags: ['male:shotacon'],
  // Note: The return result will contain the existing items with the new items
  exisitingItems: JSON.parse(
    await readFile(resolve(import.meta.dirname!, 'result_1.json'), 'utf-8'),
  ),
  resultDist: resolve(import.meta.dirname!, 'result_2.json'),
})
// 示例结果 (result_1.json)
// Example result (result_1.json)
[
  {
    "title": "[OHS (おーえいちえす)] スレイブ・セレナ [Digital]",
    "url": "https://e-hentai.org/g/3158455/ea9393ae4d/",
    "tags": [
      "parody:original",
      "female:nakadashi",
      "female:rape",
      "female:slave",
      "male:bbm",
      "male:dilf"
    ],
    "thumbnail": "https://ehgt.org/w/01/275/57753-6vc5iik3.webp"
  },
  {
    "title": "[JackOfBullets] The Giantess Next Door",
    "url": "https://e-hentai.org/g/3158454/2c241c9f30/",
    "tags": [
      "language:english",
      "female:giantess",
      "male:snuff",
      "artist:jackofbullets",
      "other:3d"
    ],
    "thumbnail": "https://ehgt.org/w/01/678/69115-scnf2k04.webp"
  }
]
Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@leaf/e-hentai

Import symbol

import * as e_hentai from "@leaf/e-hentai";
or

Import directly with a jsr specifier

import * as e_hentai from "jsr:@leaf/e-hentai";

Add Package

pnpm i jsr:@leaf/e-hentai
or (using pnpm 10.8 or older)
pnpm dlx jsr add @leaf/e-hentai

Import symbol

import * as e_hentai from "@leaf/e-hentai";

Add Package

yarn add jsr:@leaf/e-hentai
or (using Yarn 4.8 or older)
yarn dlx jsr add @leaf/e-hentai

Import symbol

import * as e_hentai from "@leaf/e-hentai";

Add Package

vlt install jsr:@leaf/e-hentai

Import symbol

import * as e_hentai from "@leaf/e-hentai";

Add Package

npx jsr add @leaf/e-hentai

Import symbol

import * as e_hentai from "@leaf/e-hentai";

Add Package

bunx jsr add @leaf/e-hentai

Import symbol

import * as e_hentai from "@leaf/e-hentai";