From c6d13b261a40bd2f63e2943f6fdbb1335170f4f4 Mon Sep 17 00:00:00 2001 From: Christian Wendt Date: Wed, 16 Oct 2024 14:52:26 +0000 Subject: [PATCH] Hockey Add new Team Utah Hockey Club --- espn_api/hockey/box_player.py | 2 +- espn_api/hockey/constant.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/espn_api/hockey/box_player.py b/espn_api/hockey/box_player.py index c785d20c..6d955982 100644 --- a/espn_api/hockey/box_player.py +++ b/espn_api/hockey/box_player.py @@ -21,7 +21,7 @@ def __init__(self, data, pro_schedule): if player['proTeamId'] in pro_schedule: (opp_id, date) = pro_schedule[player['proTeamId']] self.game_played = 100 if datetime.now() > datetime.fromtimestamp(date / 1000.0) + timedelta(hours=3) else 0 - self.pro_opponent = PRO_TEAM_MAP[opp_id] + self.pro_opponent = PRO_TEAM_MAP.get(opp_id, 'Unknown Team') player_stats = player.get('stats', []) for stats in player_stats: diff --git a/espn_api/hockey/constant.py b/espn_api/hockey/constant.py index 9ab9b793..c827db3a 100644 --- a/espn_api/hockey/constant.py +++ b/espn_api/hockey/constant.py @@ -62,6 +62,7 @@ , 30: 'Minnesota Wild' , 37: 'Vegas Golden Knights' , 124292: 'Seattle Kraken' + , 129764: 'Utah Hockey Club' } STATS_MAP = {