Giter VIP home page Giter VIP logo

southpaw's Introduction

Brandin Canfield

southpaw's People

Contributors

bcanfield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

southpaw's Issues

X_Auth Function Param issue

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!

Fixed test_fanduel.py 'list index out of range' and added function call at bottom for the noobies

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()

New web driver approach

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

What is the "Fanduel UI"?

@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.

Public API endpoints for contest data?

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?

Fixture List

It appears that the application is getting a 403 forbidden when attempting to retrieve the fixture list. Perhaps FanDuel changed access to this endpoint

Still working?

Hi,
Is this api still working? I'm able to login through your library but get_contests() and get_entries() return empty lists. Thanks.

Users Key Error

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?

Unclear where x-auth-header is

Can you show how to find the x-auth-header in both Chrome and Firefox? Here's a screenshot of what my dev console looks like; I don't know where to find the necessary info.

Fanduel_ss

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.