test case
このコミットが含まれているのは:
コミット
f824941318
|
@ -5,20 +5,20 @@ import * as dotenv from "dotenv";
|
|||
|
||||
dotenv.config();
|
||||
const jar = new CookieJar();
|
||||
jar.setCookie(process.env.CF_COOKIE || "", "https://nhentai.net/");
|
||||
jar.setCookie(process.env.COOKIE || "", "https://nhentai.net/");
|
||||
|
||||
async function test() {
|
||||
const res = await p({
|
||||
url: "https://nhentai.net/api/galleries/search?query=futa",
|
||||
url: "https://nhentai.net/api/gallery/1",
|
||||
core: {
|
||||
agent: new HttpsCookieAgent({ cookies: { jar, }, }),
|
||||
},
|
||||
"headers": {
|
||||
"User-Agent": "jandapress/1.0.5 Node.js/16.9.1" // nhentai-api-client/3.4.3 Node.js/16.9.1
|
||||
"User-Agent": process.env.USER_AGENT || "jandapress/1.0.5 Node.js/16.9.1",
|
||||
},
|
||||
});
|
||||
//check status
|
||||
|
||||
console.log(res.statusCode);
|
||||
}
|
||||
|
||||
test();
|
||||
test().catch(console.error);
|
読み込み中…
新しいイシューから参照