替换获取pt_pin的正则,解决部分cookie填写不规范获取用户名为null的情况
This commit is contained in:
@@ -69,7 +69,7 @@ if ($.isNode()) {
|
||||
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 = '';
|
||||
@@ -102,7 +102,7 @@ if ($.isNode()) {
|
||||
}
|
||||
console.log(`\n参加作者的团\n`);
|
||||
await joinLeaderTuan();//参团
|
||||
$.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1])
|
||||
$.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1])
|
||||
console.log(`\n账号内部相互进团\n`);
|
||||
for (let item of $.tuanIds) {
|
||||
console.log(`${$.UserName} 去参加团 ${item}\n`);
|
||||
|
Reference in New Issue
Block a user