bcanfield / southpaw

Python Fanduel API (2023) - Lineup Automation
https://pypi.org/project/southpaw
39 stars 2 forks source link

Users Key Error #51

Open timfro opened 1 year ago

timfro commented 1 year ago

Traceback (most recent call last): File "c:\Users\timf0\Python Projects\fanduelauto.py", line 13, in fd = southpaw.Fanduel(fd_email, fd_pw, fd_basic, fd_session) File "C:\Users\timf0\Python\lib\site-packages\southpaw\fanduel.py", line 275, in init self.authenticate() File "C:\Users\timf0\Python\lib\site-packages\southpaw\fanduel.py", line 444, in authenticate if current_response_json and len(current_response_json['users']) > 0: KeyError: 'users'

Looks like the headers doesn't initialize a "users" key but is referenced later. How would you go about this if it still is working?

empire-sports commented 1 year ago

it looks like the x-auth-token rotates. to fix this you have to retrieve it after successfully logging into their platform.