fix(remote_judger/qoj): score
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2023-03-19 21:25:27 +08:00
parent 558bc86c14
commit 5a2935b45b
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -268,8 +268,12 @@ export default class QOJProvider extends UOJProvider implements IBasicProvider {
if (document.querySelector('tbody').innerHTML.includes('Judging'))
continue;
const statusText = summary.children[3]?.children[0]?.innerHTML;
const statusMatch = /[A-Z]+/.exec(statusText);
const score =
parseInt(summary.children[3]?.children[0]?.innerHTML || '') || 0;
statusMatch && statusMatch[0] === 'AC'
? 100
: parseInt(statusText || '') || 0;
const status = score === 100 ? 'Accepted' : 'Unaccepted';
return await end({