README
ehentai-js
Grab everything from e-hentai.org(exhentai).
Features
- gallery metadata
- hentaihome status
- Static ranges
- Quality, hathrate, hitrate...
- exchange status
- gallery point exchange
- hath exchange
- search support
- search keyword
- search image
- advance options
- user-related
- rate gallery
- favorite gallery
Installation
$ npm install ehentai-js
Configuration
Configuration file should be placed as os.homedir()/.ehentai.json
(~/.ehentai.json
)
[
path.join(os.homedir(), ".ehentai.json"),
path.join(process.cwd(), ".ehentai.json")
];
Format:
{
"cookie": "ipb_member_id=*****; ipb_pass_hash=*************; igneous=**; sk=**",
"apiuid": 123456,
"apikey": "*************"
}
Cookie is required for visiting exhentai site or getting user-related information;
Apiuid and apikey are required for user-related operations such as rating.
Using environment variables is also supported.
EH_COOKIE=
EH_APIUID=
EH_APIKEY=
gallery
const h = require("ehentai-js");
// two ways to provide target url
h.gallery
.get({ url: "https://e-hentai.org/g/1456937/9345049afa/" })
.then(console.log);
// or
h.gallery
.get({ gid: 1456937, token: "9345049afa", exhentai: true })
.then(console.log);
{
title: '[Shinozuka Yuuji] Hajimete no Hitozuma | 初品嘗的美艷人妻 [Chinese]',
title_original: '[篠塚裕志] 初めてのヒトヅマ [中国翻訳]',
category: 'Manga',
tags: {
language: [ 'chinese', 'translated' ],
artist: [ 'shinozuka yuuji' ],
male: [
'dilf',
'cheating',
'schoolboy uniform',
'condom',
'muscle',
'big penis',
'glasses'
],
female: [
'big breasts', 'stockings',
'netorare', 'teacher',
'hairy', 'gyaru',
'blackmail', 'dark skin',
'paizuri', 'x-ray',
'ponytail', 'mother',
'milf', 'cheating',
'nakadashi', 'pantyhose',
'collar', 'impregnation',
'huge breasts', 'lactation'
],
misc: [ 'tankoubon', 'incest', 'inseki' ]
},
language: 'Chinese',
translated: true,
favorite_category: undefined,
source: {
site: 'exhentai',
gid: 1456937,
token: '9345049afa',
parent_gallery: undefined,
newer_versions: [],
url: 'https://exhentai.org/g/1456937/9345049afa/'
},
favcount: 7623,
rating: { average: 4.9, count: 468 },
thumbnail: 'https://exhentai.org/t/33/81/3381628f4615c218cdd262bf45e6bea6e4f44f7d-6050794-4341-3000-jpg_250.jpg',
uploader: 'dfsgg',
filecount: 236,
filesize: 717121126,
posted: 2019-08-04T09:07:00.000Z,
visible: 'Yes',
comments: [
{
text: '速度好快 今晚社保!!!5555',
date: 2019-08-04T09:25:00.000Z,
score: 7
},
{
text: '昨天才生肉,今天就出貨了,篠塚裕志的就是報社',
date: 2019-08-04T09:46:00.000Z,
score: 60
},
{
text: '我還是等未來數位的出了再買吧',
date: 2019-08-04T10:14:00.000Z,
score: 144
},
{ text: '🐍🐍🐍🐍🐍', date: 2019-08-04T10:14:00.000Z, score: 6 },
// ...
],
url: 'https://exhentai.org/g/1456937/9345049afa/',
generated: 2020-01-10T02:19:47.430Z
}
search
Support 5 different display modes (this will effect the tags field in search results).
Support keyword search & image search.
const h = require("ehentai-js");
h.search.byKeyword('artist:"shinozuka yuuji