fix: fixes checks for non live games
This commit is contained in:
@@ -10,16 +10,16 @@ def extract_game_info(scoreboard_data):
|
||||
game_state = convert_game_state(game["gameState"])
|
||||
extracted_info.append({
|
||||
"Home Team": game["homeTeam"]["name"]["default"],
|
||||
"Home Score": game["homeTeam"]["score"],
|
||||
"Home Score": game["homeTeam"]["score"] if game_state != "PRE" else "N/A",
|
||||
"Away Team": game["awayTeam"]["name"]["default"],
|
||||
"Away Score": game["awayTeam"]["score"],
|
||||
"Away Score": game["awayTeam"]["score"] if game_state != "PRE" else "N/A",
|
||||
"Home Logo": game["homeTeam"]["logo"],
|
||||
"Away Logo": game["awayTeam"]["logo"],
|
||||
"Game State": game_state,
|
||||
"Period": process_period(game),
|
||||
"Time Remaining": process_time_remaining(game),
|
||||
"Time Running": game["clock"]["running"],
|
||||
"Intermission": game["clock"]["inIntermission"],
|
||||
"Time Running": game["clock"]["running"] if game_state == "LIVE" else "N/A",
|
||||
"Intermission": game["clock"]["inIntermission"] if game_state == "LIVE" else "N/A",
|
||||
"Priority": calculate_game_priority(game),
|
||||
"Start Time": process_start_time(game),
|
||||
"Home Record": game["homeTeam"]["record"] if game["gameState"] in ["PRE", "FUT"] else "N/A",
|
||||
|
||||
Reference in New Issue
Block a user