替换获取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

@@ -49,7 +49,7 @@ let randomCount = $.isNode() ? 20 : 5;
for (let i = 0; i < cookiesArr.length; i++) {
if (cookiesArr[i]) {
cookie = cookiesArr[i];
$.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1])
$.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1])
$.index = i + 1;
$.isLogin = true;
$.nickName = '';