Jon Solow commited on
Commit
21e8914
·
1 Parent(s): d52750c

Show game clock for in progress

Browse files
Files changed (1) hide show
  1. src/stats.py +6 -1
src/stats.py CHANGED
@@ -347,7 +347,12 @@ def get_yahoo_schedule() -> dict[int, dict[str, dict[str, str | int | pd.Timesta
347
  }
348
  )
349
 
350
- if game["status_type"] == "final":
 
 
 
 
 
351
  home_team_win = home_score > away_score
352
  home_status = "Win" if home_team_win else "Loss"
353
  away_status = "Loss" if home_team_win else "Win"
 
347
  }
348
  )
349
 
350
+ if game["status_type"] == "in_progress":
351
+ clock_status = game["status_display_name"]
352
+ if clock_status:
353
+ home_team_map.update({"status": clock_status})
354
+ away_team_map.update({"status": clock_status})
355
+ elif game["status_type"] == "final":
356
  home_team_win = home_score > away_score
357
  home_status = "Win" if home_team_win else "Loss"
358
  away_status = "Loss" if home_team_win else "Win"