bcanfield / southpaw Goto Github PK
View Code? Open in Web Editor NEWPython Fanduel API (2023) - Lineup Automation
Home Page: https://pypi.org/project/southpaw
Python Fanduel API (2023) - Lineup Automation
Home Page: https://pypi.org/project/southpaw
Iām working on a project where I need data on all available contests (not just ones Iām entered in) as well as player salary data from those contests. Since this info can be seen by anyone on the fanduel website, are there any public endpoints to get this data?
Hey everybody. I'm looking into an easier way to authenticate using an undetected web driver to eliminate the need to manually retrieve the auth token. Stay tuned
@bcanfield, the main repo readme states "Retrieve your basic auth token by logging into the Fanduel UI and copying the authorization header from the dev console."
What is the Fanduel UI and how do I get/download it? My internet searches have turned up nothing.
It appears that the application is getting a 403 forbidden when attempting to retrieve the fixture list. Perhaps FanDuel changed access to this endpoint
Hi,
Is this api still working? I'm able to login through your library but get_contests() and get_entries() return empty lists. Thanks.
import southpaw
def test_get_upcoming():
basic_auth_token = 'look up basic_auth_token'
x_auth_token = 'look up long ass x_auth_token'
fanduel_email = 'put in your email'
fanduel_password = 'put in your pw'
fd = southpaw.Fanduel(fanduel_email, fanduel_password, basic_auth_token, x_auth_token)
print(fd.get_upcoming())
entries = fd.get_entries()
print(entries)
if entries:
print(fd.get_entry(entries[0].id))
rosters = fd.get_rosters()
print(rosters)
if rosters:
print(fd.get_roster(rosters[0].id))
contests = fd.get_contests()
print(contests)
if contests:
print(fd.get_contest(contests[0].id))
fixtures = fd.get_fixtures()
print(fixtures)
if fixtures:
print(fd.get_fixture(fixtures[0].id))
fixture_lists = fd.get_fixture_lists()
print(fixture_lists)
if fixture_lists:
print(fd.get_fixture_list(fixture_lists[0].id))
game_descriptions = fd.get_game_descriptions()
print(game_descriptions)
if game_descriptions:
print(fd.get_game_description(game_descriptions[0].id))
player_lists = fd.get_player_lists()
print(player_lists)
if player_lists:
print(fd.get_player_list(player_lists[0].id))
if entries:
print(fd.get_players_in_entry(entries[0].id))
print(fd.get_roster_format_in_entry(entries[0].id))
test_get_upcoming()
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?
Looking for scores of contests that have been completed.
Trying to get some simple app up and running, but I see a slight issue...
In get_x_auth_token_and_user_id
you pass the email and password. This function calls: get_fanduel_headers_without_x_auth(fanduel_email, fanduel_password)
(another email and password). but the function signature only takes one param get_fanduel_headers_without_x_auth(basic_auth_token)
not sure if this is a bug or a small oversight. Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ššš
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ā¤ļø Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.