fix(remote_judger/codeforces): login check
All checks were successful
continuous-integration/drone/push Build is passing

ref: 9f1169b3e0
This commit is contained in:
Baoshuo Ren 2023-04-08 15:23:21 +08:00
parent c5129082b7
commit 10ee5ca049
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -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');
});
}