This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-08-16 19:28:51 +02:00
commit 9d75757fec
20 changed files with 287594 additions and 0 deletions

18
get_data/get-results.py Normal file
View File

@@ -0,0 +1,18 @@
import subprocess
import json
with open("./events.json", "r") as f:
sports = json.load(f)
ret = {}
for sport in sports:
ret[sport] = {}
for event in sports[sport]:
stdout = subprocess.check_output(f'./get-results.sh {sport} {event}', shell=True)
result = json.loads(stdout)
ret[sport][event] = result
print(f"Done with {sport} >> {event}")
with open("./results.json", "w") as f:
json.dump(ret, f, indent=4, ensure_ascii=False, sort_keys=True)