Getting Current Fantasy Football League Data w/ Python & ESPN API
The four libraries we need for this project are: pandas, numpy, and matplotlib. Use pip to install all of these on your machine.
We also need to find some Cookies values to access ESPN private fantasy football league data. The values we need are leagueId, swid, and espn_s2. To get leagueId simply log into your ESPN league and look at the end of the url for where it says ?leagueId=123456. Paste this number value in the corresponding variable in you config.py file.
To find our cookies values, swid and espn_s2, log into your ESPN league in a browser and anywhere on the page right-click and hit Inspect Element. In the Storage tab of your browser developer tools, scroll down to espn.com and find swid and espn_s2. Copy and paste these values in your config.py file.
