roclark / sportsipy

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

NFL Team data not retrieving #791

Open VirtualMe64 opened 4 months ago

VirtualMe64 commented 4 months ago

Describe the bug Running the example code to pull team data results in the error "ValueError: Team abbreviation DET not found"

To Reproduce Sample code which causes an issue.

from sportsipy.nfl.teams import Teams

teams = Teams()
lions = teams('DET')

Solution I solved this by modifying the function _pull_page in utils.py

        return pq(url) # old
        return pq(requests.get(url).content) # fixed
davidjkrause commented 4 months ago

As with most recent issues here, this case is resolved by the fork at https://github.com/davidjkrause/sportsipy

See my similar comment on most of the recent issues, this particular repo seems no longer maintained.