cwendt94 / espn-api

ESPN Fantasy API! (Football, Basketball)
MIT License
544 stars 183 forks source link

Team Names not correct #462

Closed stoller2122 closed 10 months ago

stoller2122 commented 10 months ago

Sport

Football

Summary

Seems like ESPN changed the location + nickname format for team names this year in fantasy football. Only a single team "name" now for team names. Output for each team is "Team" + . This is an issue for a family league where everyone has the same last name.

*Edit: This issue only impacts a team newly created this year (2023) with team names updated this year. Seems like an old league (no team names updated this year) displays the expected team names.

Updating line 8 in team.py from: self.team_name = "%s %s" % (data['location'], data['nickname']) to: self.team_name = data['name'])

Logs/Data

Pulling data for a newly created 2023 league gave me following output for league.teams [Team(Team Smith), Team(Team Smith), Team(Team Smith), Team(Team Smith), Team(Team Smith), Team(Team Smith), Team(Team Smith), Team(Team Smith)]

After updating the module with fix from above I now get the following output for league.teams [Team(Cee Dee), Team(The Newts), Team(ÑFL), Team(So Hard), Team(Beavers), Team(Pabst Blue Ribbon), Team(The Bois), Team(Kyler Murray)]

dtcarls commented 10 months ago

I was able to replicate the issue. Thank you the details. #463 submitted as a fix.

mkirby528 commented 10 months ago

Thanks for making this change! Was also running into the same issue and glad you found a fix! Hoping we can get this merged!