mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-21 21:48:42 +00:00
fix(remote_judger/codeforces): login check
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
ref: 9f1169b3e0
This commit is contained in:
parent
c5129082b7
commit
10ee5ca049
@ -169,11 +169,9 @@ export default class CodeforcesProvider implements IBasicProvider {
|
||||
}
|
||||
|
||||
get loggedIn() {
|
||||
return this.get('/enter').then(res => {
|
||||
return this.get('/').then(res => {
|
||||
const html = res.text;
|
||||
|
||||
if (html.includes('Login into Codeforces')) return false;
|
||||
|
||||
if (html.length < 1000 && html.includes('Redirecting...')) {
|
||||
logger.debug('Got a redirect', html);
|
||||
return false;
|
||||
@ -188,7 +186,7 @@ export default class CodeforcesProvider implements IBasicProvider {
|
||||
if (_39ce7) this.setCookie('39ce7', _39ce7);
|
||||
}
|
||||
|
||||
return true;
|
||||
return html.includes('header-bell__img');
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user