roclark / sportsipy

A free sports API written for python
MIT License
475 stars 189 forks source link

NBA rosters not being pulled correctly #722

Open Jack-Gitter opened 2 years ago

Jack-Gitter commented 2 years ago

Describe the bug The NBA rosters are not being pulled correctly

To Reproduce Sample code which causes an issue.

from sportsipy.nba.teams import Teams
]
def findThreePointShooters(event=None,context=None):

    teams = Teams()
    for team in teams:
        roster = team.roster
        print(roster)

Expected behavior To print all of the rosters in the NBA

Fix A github post mentions changing this:

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')

to this:

teams_list = utils._get_stats_table(doc, '#totals-team') opp_teams_list = utils._get_stats_table(doc, '#totals-opponent')

in nba_utils.py

can this be fixed??