|
@@ -36,7 +36,7 @@ async function Main() {
|
|
|
loginExtData = null;
|
|
loginExtData = null;
|
|
|
magicJS.notification.appendNotifyInfo(`【${username}】登录失败`);
|
|
magicJS.notification.appendNotifyInfo(`【${username}】登录失败`);
|
|
|
}else{
|
|
}else{
|
|
|
- if(loginData.cacheUse == 1){
|
|
|
|
|
|
|
+ if(loginExtData.cacheUse){
|
|
|
// 尝试使用缓存数据来签到
|
|
// 尝试使用缓存数据来签到
|
|
|
loginExtData = magicJS.data.read(cloud189LoginDataKey, null, session);
|
|
loginExtData = magicJS.data.read(cloud189LoginDataKey, null, session);
|
|
|
magicJS.logger.info(`尝试使用缓存数据来签到`);
|
|
magicJS.logger.info(`尝试使用缓存数据来签到`);
|
|
@@ -141,6 +141,7 @@ async function getLoginAccoutUrlInfo(url){
|
|
|
// magicJS.logger.info(`页面数据:${htmlText}`);
|
|
// magicJS.logger.info(`页面数据:${htmlText}`);
|
|
|
magicJS.logger.info(`响应头部:${JSON.stringify(resp.headers)}`);
|
|
magicJS.logger.info(`响应头部:${JSON.stringify(resp.headers)}`);
|
|
|
let urlMatch = htmlText.match(/<a id="j-tab-login-link"[^>]*href="([^"]+)"/); // 正则表达式匹配
|
|
let urlMatch = htmlText.match(/<a id="j-tab-login-link"[^>]*href="([^"]+)"/); // 正则表达式匹配
|
|
|
|
|
+ magicJS.logger.info(`urlMatch=${JSON.stringify(urlMatch)}`);
|
|
|
if(urlMatch){
|
|
if(urlMatch){
|
|
|
let cookieData = magicJS.parseSetCookies(resp.headers['Set-Cookie'] || '');
|
|
let cookieData = magicJS.parseSetCookies(resp.headers['Set-Cookie'] || '');
|
|
|
let cookieDict = {};
|
|
let cookieDict = {};
|
|
@@ -155,6 +156,7 @@ async function getLoginAccoutUrlInfo(url){
|
|
|
cookieDict[name] = value;
|
|
cookieDict[name] = value;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ magicJS.logger.info(`urlMatch=${JSON.stringify(cookieDict)}`);
|
|
|
resolve({url: urlMatch[1], cookie: cookieDict});
|
|
resolve({url: urlMatch[1], cookie: cookieDict});
|
|
|
}else{
|
|
}else{
|
|
|
resolve();
|
|
resolve();
|