новый коммит

This commit is contained in:
2025-10-31 16:57:31 +03:00
parent d4a819f82a
commit ee0a4b9f98

View File

@@ -1313,7 +1313,7 @@ async def referee():
@app.get("/team_comparison.json")
async def team_comparison():
try:
if STATUS not in ["no_game_today", "finished_today"]:
data = latest_data["pregame"]["data"]["result"]
teams = []
for data_team in (data["teamStats1"], data["teamStats2"]):
@@ -1383,8 +1383,8 @@ async def team_comparison():
}
teams.append(temp_team)
return teams
except TypeError:
return {"Данных о сравнении команд нет!"}
else:
return [{"Данных о сравнении команд нет!"}]
@@ -1462,7 +1462,10 @@ async def regular_standings():
@app.get("/live_status.json")
async def live_status():
return [latest_data["live-status"]["data"]["result"]]
if STATUS in ["live", "live_soon"]:
return [latest_data["live-status"]["data"]["result"]]
else:
return [{"foulsA": 0, "foulsB": 0}]
if __name__ == "__main__":