Replies: 1 comment
-
Hey @jorrflv so you don't have to update any of the files in this package you just need to load them in. So if you have installed the python package you can create a league class by importing and doing this in a python file from espn_api.football import League
league = League(league_id=1234, year=2023, espn_s2='123', swid='123') Here is the wiki that goes over some of this and more details to the package features. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on a Mac in Cursor and I have everything installed. However, I don't know if I have my league parameters correct. In league.py I defined all my variables correctly I believe, but when I run the python script I get an error. (base) orrj@Staff iMac-C02D94FFPN7C espn-api % /usr/local/bin/python3 /Users/orrj/Documents/GitHub/espn-api/espn_api/football/league.py
Traceback (most recent call last):
File "/Users/orrj/Documents/GitHub/espn-api/espn_api/football/league.py", line 6, in
from ..base_league import BaseLeague
ImportError: attempted relative import with no known parent package
class League(BaseLeague): '''Creates a League instance for Public/Private ESPN league''' def __init__(self, league_id: int, year: int, espn_s2=None, swid=None, fetch_league=True, debug=False): super().__init__(league_id=836646, year=2023, sport='nfl', espn_s2='copied from cookies', swid='copied from cookies', debug=true)
Is there a quick startup video that could help with just getting going?
Beta Was this translation helpful? Give feedback.
All reactions