mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 09:38:42 +00:00
fix(remote_judger/atcoder): getCsrfToken
This commit is contained in:
parent
eead1d8c85
commit
0aacb14b9b
@ -129,6 +129,9 @@ export default class AtcoderProvider implements IBasicProvider {
|
||||
this.cookie = header['set-cookie'];
|
||||
}
|
||||
|
||||
let value = /csrfToken = "(.+?)"/g.exec(html);
|
||||
if (value) return value[1];
|
||||
|
||||
if (document.body.children.length < 2 && html.length < 512) {
|
||||
throw new Error(document.body.textContent!);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user