替换获取pt_pin的正则,解决部分cookie填写不规范获取用户名为null的情况

This commit is contained in:
lxk0301
2021-03-24 15:27:58 +08:00
parent 30c85e70a7
commit 3b94a8e47c
95 changed files with 99 additions and 3720 deletions

View File

@@ -73,7 +73,7 @@ const JD_API_HOST = "https://urvsaggpt.m.jd.com/guardianstar";
if (cookiesArr[i]) {
cookie = cookiesArr[i];
$.UserName = decodeURIComponent(
cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]
cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]
);
$.index = i + 1;
$.beanCount = 0;