-
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
ESPN Fantasy platform updates broke JSON parsing? #59
Comments
All of the API endpoints that I've tried appear to be redirecting to |
The new API is based at League pages now make a call to e.g. http://fantasy.espn.com/apis/v3/games/ffl/seasons/2018/segments/0/leagues/7168?view=mBoxscore&view=mMatchupScore&view=mSchedule&view=mScoreboard&view=mSettings&view=mStatus&view=mTeam&view=mRoster&view=modular&view=mNav That path appears to give all the available data for a league, regardless of what you pass as the value of the |
@rbarton65 Looks like the ESPN relaunch has totally messed this up, would gladly assist in trying to fix this up. |
@danabrey do you by chance have a list of the new endpoints? I wrote a .NET package for this that I need to update as well. I haven't started sniffing out the endpoints yet, so I figured I'd check to see if you have. Also, here's a URL for my league which is public unlike the link above: http://fantasy.espn.com/apis/v3/games/ffl/seasons/2019/segments/0/leagues/526113?view=mBoxscore&view=mMatchupScore&view=mSchedule&view=mScoreboard&view=mSettings&view=mStatus&view=mTeam&view=mRoster&view=modular&view=mNav Side note: I reached out to my comish, and he said that as part of this redesign, our league got reset to private. Sounds like if you were using a public league like us, you'll need to set it to public again. |
@scottenriquez From what I could see when I last looked, there isn't a "list" of endpoints because that's the only one. Whatever you pass as the value of the "view" GET parameter, you get everything. Thanks for the pointer about the league being reset to private! |
I love this project to help me score my league's non-standard scoring system. |
The last activity on this project was in August 2017 so I am sort of assuming that @rbarton65 has moved on to other things, given that that was their last GitHub activity too? It might be a fork-and-fix job, and then a courtesy pull request. I am happy to help but I'm not an experienced Python developer. |
I hacked a few things into this module for my personal use. I was planning to see if I can salvage anything using the v3 endpoints before the start of this season. If I find anything, I'll fork and post it here. |
And look at that, someone already documented and built a "thing" with the new V3 api! https://github.com/mkreiser/ESPN-Fantasy-Football-API . This is in Node however. But, this is good, a lot of the hard work is already done. |
I would be interested in supporting/working on anything related to this. Found another resource with a Python focus: https://stmorse.github.io/journal/espn-fantasy-v3.html |
Here is a repo of a python V3 API in progress: https://github.com/cwendt94/ff-espn-api |
Are you able to get the url above to work with seasons prior to 2018? I only seem to be able to get it to work with 2018 and 2019. |
@tflurry I ran into the same issue and haven't found a way around this. |
Yeah, ESPN just killed any sort of public access to that history. There's no way of accessing it on the front-end anymore either. Shame. |
@scottenriquez @danabrey that's unfortunate... i wonder if we could petition to get them to make that history available... with the threat of leaving ESPN for Yahoo or someone else! lol.. we'd need a lot of signatures.. |
There's actually a second endpoint for the history of your fantasy football league. The url is: https://fantasy.espn.com/apis/v3/games/ffl/leagueHistory/ + "league ID"?seasonId="year" |
From what I can tell, some big changes to the ESPN fantasy platform may have changed the format of the JSON this package parses. Especially when attempting to get the leage:
league = League(league_id, year)
.I get a
JSONDecodeError("Expecting value", s, err.value) from None
followed byjson.decoder.JSONDecodeError: Expecting value: line 2 column 2 (char 2)
. Can anyone else confirm this problem?The text was updated successfully, but these errors were encountered: