parse json response

This commit is contained in:
2026-08-02 05:25:59 -04:00
parent a29a556e1f
commit 2267b45519
+2 -1
View File
@@ -26,8 +26,9 @@ def fetch_data():
try: try:
resp = requests.get("https://api.alexav.gg/v4/sports/fantasy", timeout=5) resp = requests.get("https://api.alexav.gg/v4/sports/fantasy", timeout=5)
resp.raise_for_status() resp.raise_for_status()
data = resp.json()
for player in resp["team1"]["players"]: for player in data["team1"]["players"]:
players['team1'].append({ players['team1'].append({
"first_name": player['first_name'], "first_name": player['first_name'],
"last_name": player['last_name'], "last_name": player['last_name'],