Closed colllin closed 1 year ago
This looks good to me. I currently do not have an actual Fleaflicker league to test this on. Is this working for you with the change?
It's working for me, but also the API is not authenticated right now so you can test with this league ID: 91436
Before the change, this threw an error about "no weeks found in season":
from leeger.league_loader.FleaflickerLeagueLoader import FleaflickerLeagueLoader
from leeger.model.league import League
fleaflickerLeagueLoader = FleaflickerLeagueLoader("91436", [2022])
league = fleaflickerLeagueLoader.loadLeague()
The Fleaflicker API docs say that it defaults to the current year (2023), which of course has no weeks. After the change to specify the season in the API call, it finds the weeks and doesn't throw an error.
Thank for your help!
Fixed and added multi-year support for Fleaflicker in the latest release.
I was able to get multiple years from your league into an Excel sheet using this code:
from leeger.league_loader.FleaflickerLeagueLoader import FleaflickerLeagueLoader
from leeger.util.excel import leagueToExcel
if __name__ == '__main__':
fleaflickerLeagueLoader = FleaflickerLeagueLoader("91436", [2021, 2022])
league = fleaflickerLeagueLoader.loadLeague()
leagueToExcel(league, "somepath/foo.xlsx", overwrite=True)
Please let me know if you come across any other issues with Fleaflicker in this library and I'll be sure to look into them.
…API (or defaults to current year?)