Skip to content

Commit

Permalink
Merge pull request #95 from cwendt94/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
cwendt94 authored Jul 8, 2020
2 parents 389b0e3 + c624a38 commit 14fc366
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions espn_api/football/box_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ def __init__(self, data, pro_schedule, positional_rankings, week):
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
if str(player['defaultPositionId']) in positional_rankings:
posId = str(player['defaultPositionId'])
if posId in positional_rankings:
self.pro_opponent = PRO_TEAM_MAP[opp_id]
self.pro_pos_rank = positional_rankings[str(player['defaultPositionId'])][str(opp_id)]
self.pro_pos_rank = positional_rankings[posId][str(opp_id)] if str(opp_id) in positional_rankings[posId] else 0


player_stats = player['stats']
Expand Down

0 comments on commit 14fc366

Please sign in to comment.