[什么值得买] 修复某些情况下获取不到CookieId的问题

This commit is contained in:
blackmatrix7 2022-09-21 10:25:25 +08:00
parent acd7fcd588
commit f6333009c2
1 changed files with 1 additions and 2 deletions

View File

@ -34,8 +34,7 @@ async function getWebCookie() {
currentCookie = $.request.headers.cookie || $.request.headers.Cookie;
if (currentCookie.length >= 200) {
$.logger.info(`当前页面获取的Cookie: ${currentCookie}`);
const matchStr = currentCookie.match(/__ckguid=[^\s]*;/);
const cookieId = matchStr !== null ? matchStr[0] : null;
const cookieId = currentCookie.match(/__ckguid=([^;]*)/ig);
$.logger.info(`当前页面获取的CookieId\n${cookieId}`);
// 获取新的session_id
if (cookieId) {