mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-08 12:58:42 +00:00
fix(remote_judger/qoj): score
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
558bc86c14
commit
5a2935b45b
@ -268,8 +268,12 @@ export default class QOJProvider extends UOJProvider implements IBasicProvider {
|
|||||||
if (document.querySelector('tbody').innerHTML.includes('Judging'))
|
if (document.querySelector('tbody').innerHTML.includes('Judging'))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
const statusText = summary.children[3]?.children[0]?.innerHTML;
|
||||||
|
const statusMatch = /[A-Z]+/.exec(statusText);
|
||||||
const score =
|
const score =
|
||||||
parseInt(summary.children[3]?.children[0]?.innerHTML || '') || 0;
|
statusMatch && statusMatch[0] === 'AC'
|
||||||
|
? 100
|
||||||
|
: parseInt(statusText || '') || 0;
|
||||||
const status = score === 100 ? 'Accepted' : 'Unaccepted';
|
const status = score === 100 ? 'Accepted' : 'Unaccepted';
|
||||||
|
|
||||||
return await end({
|
return await end({
|
||||||
|
Loading…
Reference in New Issue
Block a user