Spaces:
Sleeping
Sleeping
fix team_id bug
Browse files
app.py
CHANGED
|
@@ -38,7 +38,7 @@ def get_pl_team_stats(pl_team_name: str = "Liverpool", season: str = "2023-24")
|
|
| 38 |
bottom6 = [name for name, pos in standings.items() if pos >= 15]
|
| 39 |
|
| 40 |
# Now fetch team's fixtures
|
| 41 |
-
team_id = [id for id, name in teams.items() if
|
| 42 |
fixtures_url = f"https://fantasy.premierleague.com/api/team/{team_id}/fixtures/"
|
| 43 |
response = requests.get(fixtures_url)
|
| 44 |
response.raise_for_status()
|
|
|
|
| 38 |
bottom6 = [name for name, pos in standings.items() if pos >= 15]
|
| 39 |
|
| 40 |
# Now fetch team's fixtures
|
| 41 |
+
team_id = [id for id, name in teams.items() if pl_team_name in name][0]
|
| 42 |
fixtures_url = f"https://fantasy.premierleague.com/api/team/{team_id}/fixtures/"
|
| 43 |
response = requests.get(fixtures_url)
|
| 44 |
response.raise_for_status()
|