From 85f0df535ee7a0467bef26f6280efc300b5b2a14 Mon Sep 17 00:00:00 2001 From: sinkaroid Date: Tue, 7 Jun 2022 16:01:00 +0700 Subject: [PATCH] fix(modifier): removed outdated method --- src/utils/modifier.ts | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/utils/modifier.ts b/src/utils/modifier.ts index c26587c..57cb025 100644 --- a/src/utils/modifier.ts +++ b/src/utils/modifier.ts @@ -1,29 +1,5 @@ import p from "phin"; -import { CookieJar } from "tough-cookie"; -import { HttpsCookieAgent } from "http-cookie-agent/http"; -import { config } from "dotenv"; -import * as pkg from "../../package.json"; -config(); -const jar = new CookieJar(); -jar.setCookie(process.env.CF as string, "https://nhentai.net/"); - -async function nhentaiStatus(): Promise { - const res = await p({ - url: "https://nhentai.net/api/galleries/search?query=futanari", - core: { - agent: new HttpsCookieAgent({ cookies: { jar, }, }), - }, - "headers": { - "User-Agent": `jandapress/${pkg.version} Node.js/16.9.1` - }, - }); - if (res.statusCode === 200) { - return true; - } else { - return false; - } -} function getPururinInfo(value: string) { return value.replace(/\n/g, " ").replace(/\s\s+/g, " ").trim(); @@ -87,4 +63,4 @@ export const isNumeric = (val: string) : boolean => { }; -export { getPururinInfo, getPururinPageCount, getUrl, getId, getDate, timeAgo, mock, nhentaiStatus }; \ No newline at end of file +export { getPururinInfo, getPururinPageCount, getUrl, getId, getDate, timeAgo, mock }; \ No newline at end of file