diff --git a/src/utils/modifier.ts b/src/utils/modifier.ts index bc96c8b..3875f17 100644 --- a/src/utils/modifier.ts +++ b/src/utils/modifier.ts @@ -82,6 +82,16 @@ export async function getIdRandomPururin (): Promise { return parseInt(randomgallery); } +export async function getIdRandomNhentai (): Promise { + const res: any = await p({ + url: `${c.NHENTAI}/random`, + followRedirects: true, + }); + + const getId = res.socket._httpMessage.path; + return parseInt(getId.replace(/^\/g\/([0-9]+)\/?$/, "$1")); +} + export { getPururinInfo, getPururinPageCount, getUrl, getId, getDate, timeAgo, mock, getPururinLanguage, removeNonNumeric }; \ No newline at end of file