From 4228e8f2e52c799742a121be6d407b288e6ce7ca Mon Sep 17 00:00:00 2001 From: JoelNiemela Date: Sun, 18 Aug 2024 00:26:12 +0200 Subject: [PATCH] Remove lxml dependency; fetch data directly from ?json endpoint --- submit.py | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/submit.py b/submit.py index 7b40f7d..91fd324 100755 --- a/submit.py +++ b/submit.py @@ -9,8 +9,6 @@ import requests import requests.exceptions -from lxml.html import fragment_fromstring - # Python 2/3 compatibility if sys.version_info[0] >= 3: import configparser @@ -324,8 +322,10 @@ def show_judgement(submission_url, cfg): status = get_submission_status(submission_url, login_reply.cookies) status_id = status['status_id'] score = status['score'] + runtime = status['runtime'] testcases_done = status['testcase_index'] - testcases_total = status['row_html'].count('