Skip to content

Commit

Permalink
Fix issue pulling NBA stats
Browse files Browse the repository at this point in the history
The NBA Teams module was attempting to pull stats from a table that
doesn't exist as the tables have been renamed on the website.

Signed-Off-By: Robert Clark <[email protected]>
  • Loading branch information
roclark committed Aug 23, 2021
1 parent bf0c14d commit 5dd02a6
Show file tree
Hide file tree
Showing 3 changed files with 5,221 additions and 73 deletions.
4 changes: 2 additions & 2 deletions sportsipy/nba/nba_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ def _retrieve_all_teams(year, season_file=None):
utils._url_exists(SEASON_PAGE_URL % str(int(year) - 1)):
year = str(int(year) - 1)
doc = utils._pull_page(SEASON_PAGE_URL % year, season_file)
teams_list = utils._get_stats_table(doc, 'div#all_team-stats-base')
opp_teams_list = utils._get_stats_table(doc, 'div#all_opponent-stats-base')
teams_list = utils._get_stats_table(doc, 'div#div_totals-team')
opp_teams_list = utils._get_stats_table(doc, 'div#div_totals-opponent')

if not teams_list and not opp_teams_list:
utils._no_data_found()
Expand Down
Loading

0 comments on commit 5dd02a6

Please sign in to comment.