Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
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


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,
MacOS用户请提前安装Chrome浏览器,Windows请手动指定chromePath(可以用自带的Edge浏览器).MacOSusers please installChromebrowser in advance,Windowsusers please specifychromePathmanually (you can use the built-inEdgebrowser).
# 安装 # 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
Add Package
deno add jsr:@leaf/e-hentai
Import symbol
import * as e_hentai from "@leaf/e-hentai";
Import directly with a jsr specifier
import * as e_hentai from "jsr:@leaf/e-hentai";
Add Package
pnpm i jsr:@leaf/e-hentai
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
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";