From 5dbf3e5fefd33e082475650a83b5b0f211aeb8e4 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Fri, 23 Aug 2024 13:49:56 +0800 Subject: [PATCH] feat(bilibili): enable stealth --- lib/routes/bilibili/cache.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/routes/bilibili/cache.ts b/lib/routes/bilibili/cache.ts index 01f58714b..a22d7d15a 100644 --- a/lib/routes/bilibili/cache.ts +++ b/lib/routes/bilibili/cache.ts @@ -13,7 +13,9 @@ const getCookie = () => { } const key = 'bili-cookie'; return cache.tryGet(key, async () => { - const browser = await puppeteer(); + const browser = await puppeteer({ + stealth: true, + }); const page = await browser.newPage(); const waitForRequest = new Promise((resolve) => { page.on('requestfinished', async (request) => {