mirror of
https://github.com/blackmatrix7/ios_rule_script.git
synced 2024-12-26 00:59:20 +08:00
[什么值得买] 修复某些情况下获取不到CookieId的问题
This commit is contained in:
parent
acd7fcd588
commit
f6333009c2
@ -34,8 +34,7 @@ async function getWebCookie() {
|
|||||||
currentCookie = $.request.headers.cookie || $.request.headers.Cookie;
|
currentCookie = $.request.headers.cookie || $.request.headers.Cookie;
|
||||||
if (currentCookie.length >= 200) {
|
if (currentCookie.length >= 200) {
|
||||||
$.logger.info(`当前页面获取的Cookie: ${currentCookie}`);
|
$.logger.info(`当前页面获取的Cookie: ${currentCookie}`);
|
||||||
const matchStr = currentCookie.match(/__ckguid=[^\s]*;/);
|
const cookieId = currentCookie.match(/__ckguid=([^;]*)/ig);
|
||||||
const cookieId = matchStr !== null ? matchStr[0] : null;
|
|
||||||
$.logger.info(`当前页面获取的CookieId\n${cookieId}`);
|
$.logger.info(`当前页面获取的CookieId\n${cookieId}`);
|
||||||
// 获取新的session_id
|
// 获取新的session_id
|
||||||
if (cookieId) {
|
if (cookieId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user