From 39f23ec61b117ea1f83e3c1ca840016e3f8dc847 Mon Sep 17 00:00:00 2001 From: Ricardo Delgado Date: Wed, 3 Nov 2021 14:36:18 -0400 Subject: [PATCH 1/2] Fix NBA team stat table id Remove leading div_ reference to table id --- sportsipy/nba/nba_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sportsipy/nba/nba_utils.py b/sportsipy/nba/nba_utils.py index dc9f6cc7..50e8fd0c 100644 --- a/sportsipy/nba/nba_utils.py +++ b/sportsipy/nba/nba_utils.py @@ -82,8 +82,10 @@ 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#div_totals-team') - opp_teams_list = utils._get_stats_table(doc, 'div#div_totals-opponent') + teams_list = utils._get_stats_table(doc, 'div#totals-team') + opp_teams_list = utils._get_stats_table(doc, 'div#totals-opponent') + + print(teams_list) if not teams_list and not opp_teams_list: utils._no_data_found() From b944d8dc4487d0b6569a2a23ac398244866b306e Mon Sep 17 00:00:00 2001 From: Ricardo Delgado Date: Wed, 3 Nov 2021 14:48:32 -0400 Subject: [PATCH 2/2] Remove unnecessary print Removes unncessary print that was accidentally added/nSigned-Off-By: Ricardo Delgado --- sportsipy/nba/nba_utils.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/sportsipy/nba/nba_utils.py b/sportsipy/nba/nba_utils.py index 50e8fd0c..54a88672 100644 --- a/sportsipy/nba/nba_utils.py +++ b/sportsipy/nba/nba_utils.py @@ -85,8 +85,6 @@ def _retrieve_all_teams(year, season_file=None): teams_list = utils._get_stats_table(doc, 'div#totals-team') opp_teams_list = utils._get_stats_table(doc, 'div#totals-opponent') - print(teams_list) - if not teams_list and not opp_teams_list: utils._no_data_found() return None, None