-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Private leagues #28
Comments
I would be very interested in this feature too. |
If you log in via your browser and look at the cookies stored, you should see two named 'espn_s2' and 'SWID'. If you pass those with the GET request in League._fetch_league() it will work:
|
I'll be closing this in the next patch. Thank you @segfaultmagnet! |
Hmm, so have we verified that this works? If so, what method did you guys use find the espn_s2 and SWID, and what format are they in. Do you submit the SWID with braces or without? Here is what my cookies looked like: |
This works for me -- you'll need to grab the latest master branch from github instead of using the pip install since I don't think the change is in a release yet. Those credentials look right to me as well, I did include the braces for the SWID and that worked. The auth will look something like this:
|
Right. How did you find you espn_s2? |
@CMorton737 I found it by inspecting the league homepage in Chrome, going to the Application tab, and looking for espn_s2 under Cookies |
You can find them by logging in through your browser and looking at cookies for espn.com after you've logged in. A better method would be to use the client that fgblomqvist came up with. edit: More specifically, they are cookies for |
How are you supposed to grab the cookie from a private league on the league home page if the league is private to begin with? Can a cookie from any league work? |
It needs to be your account. Use your ESPN log-in credentials to sign in to your account, and only then will you be able to access the espn_s2 and swid cookies. These cookies are unique to your account, and determine what private leagues on ESPN you have access to (only leagues that are associated with your email address/ESPN account) If your account does not have access to a private league through the web UI, then you cannot obtain the cookies required to access it programmatically. |
I think I'm following this to a T. However, when I type league = League(league_id, year, espn_s2, swid) I receive the following error |
I'm also getting this. Did you figure it out? |
I am still having issues getting it to work for private leagues...
current
|
Can you post a scrubbed example of the swid and s2 tokens youre using? |
Those are what I am entering.. Obviously I removed characters for security purposes |
Did you get a change to look at it and see what's going on? |
Hi, this is an interesting project. Is there any chance of supporting private leagues using stored credentials in the future via OAuth or whatever the ESPN backend is using?
The text was updated successfully, but these errors were encountered: