Skip to content

NFL Team data not retrieving #791

@VirtualMe64

Description

@VirtualMe64

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions