Skip to content

Update sudojia_sspanel.js #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: script
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/web/sudojia_sspanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const headers = {
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"User-Agent": sudojia.getRandomUserAgent('PC'),
'Accept': 'application/json, text/javascript, */*; q=0.01',
'Accept-Encoding': 'gzip, deflate, br, zstd',
'Accept-Encoding': 'gzip, deflate',
};

!(async () => {
Expand Down Expand Up @@ -84,8 +84,9 @@ async function login(url, email, pwd) {
console.log('登录成功~');
await $.wait(sudojia.getRandomWait(800, 1200));
await checkin(url);
delete headers.Cookie;
} catch (e) {
console.error(`登录时发生异常:${e}`);
console.error(`登录时发生异常:${e.errors}`);
}
}

Expand All @@ -112,4 +113,4 @@ async function checkin(url) {
} catch (e) {
console.error(`签到时发生异常:${e}`);
}
}
}