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)
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889import type { Cookie } from 'npm:puppeteer-core@23.10.4' /** Result for each item */ export type Item = { /** Title of the item */ title: string /** URL of the item */ url: string /** Tags of the item */ tags: string[] /** Thumbnail url of the item */ thumbnail: string } /** Configuration for the search */ export type Config = { /** * Whether to use headless browser * * @default 'true' */ headless?: boolean /** * Whether to close the browser after the search * * @default 'true' */ autoCloseBroswer?: boolean /** * Cookies for authentication * * @default '[]' */ cookies?: Cookie[] /** * Executable path of the Chrome * * @default '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' */ chromePath?: string /** * Base tags (tags that are not banned) * * @default '[]' */ baseTags?: string[] /** * Extra tags (tags that are banned) * * @default '[]' */ extraTags?: string[] /** * Exsiting items, will be skipped * * @default '[]' */ exisitingItems?: Item[] /** * Absolute path of result (ends with .json) * If not provided, the result will not be saved */ resultDist?: string /** * Absolute path of error (ends with .json) * If not provided, the error will not be saved */ errorDist?: string /** * User agent for the browser * * @default 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36' */ userAgent?: string /** * Viewport of the browser * @default '{ width: 1200, height: 700 }' */ viewPort?: { width: number height: number } /** * Stop searching when duplicate items are found * * @default 'false' */ stopOnDuplicate?: boolean }