тест с финишем матчей

This commit is contained in:
2026-04-24 21:40:10 +03:00
parent 2c21bce9ed
commit c4f2cb34da

View File

@@ -217,8 +217,9 @@ def fetch_match_live_data(match_id: int) -> dict:
live = soup.find("section", class_=lambda c: c and "game--live" in c) live = soup.find("section", class_=lambda c: c and "game--live" in c)
if live: if live:
return {"status": "live", "home_score": home, "away_score": away} return {"status": "live", "home_score": home, "away_score": away}
elif not live and home and away: else:
return {"status": "finished", "home_score": home, "away_score": away} if home and away:
return {"status": "finished", "home_score": home, "away_score": away}
return {"status": "scheduled", "home_score": home, "away_score": away} return {"status": "scheduled", "home_score": home, "away_score": away}