fix(cache): update request URL for cookie retrieval in getCookie function
This commit is contained in:
parent
6969cf1bcb
commit
6e29199fd2
|
|
@ -40,7 +40,7 @@ const getCookie = (disableConfig = false) => {
|
|||
onBeforeLoad: (page) => {
|
||||
waitForRequest = new Promise<string>((resolve) => {
|
||||
page.on('requestfinished', async (request) => {
|
||||
if (request.url() === 'https://api.bilibili.com/x/internal/gaia-gateway/ExClimbWuzhi') {
|
||||
if (request.url() === 'https://api.bilibili.com/x/web-interface/nav') {
|
||||
const cookies = await page.cookies();
|
||||
let cookieString = cookies.map((cookie) => `${cookie.name}=${cookie.value}`).join('; ');
|
||||
cookieString = cookieString.replace(/b_lsid=[0-9A-F]+_[0-9A-F]+/, `b_lsid=${utils.lsid()}`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue