from leeger.league_loader import YahooLeagueLoader from leeger.model.league import League from leeger.util.excel import leagueToExcel if __name__ == "__main__": # You will need an application registered on the Yahoo Developer Site: https://developer.yahoo.com/apps/. # You will need your client ID and secret. # The app only needs to have read permissions. # The app will need to have a callback/redirect URI of https://localhost:8000 # Get a League object clientId = "dj0yJmk9SmhKOTNwcDNoNTdoJmQ9WVdrOWJYSldOMUZFZUZVbWNHbzlNQT09JnM9Y29uc3VtZXJzZWNyZXQmc3Y9MCZ4PTk4" clientSecret = "1e6dd31880024c539cd96f3b86e704e91d28bfa9" yahooLeagueLoader = YahooLeagueLoader( "31171", [2021, 2022, 2023], clientId=clientId, clientSecret=clientSecret ) league: League = yahooLeagueLoader.loadLeague() leagueToExcel(league, "C:\\myLeagueStats.xlsx") # When you load your Yahoo league, it will attempt to authenticate based on your client ID and client secret. # You can set a timeout for this by passing in loginTimeoutSeconds. clientId = "dj0yJmk9SmhKOTNwcDNoNTdoJmQ9WVdrOWJYSldOMUZFZUZVbWNHbzlNQT09JnM9Y29uc3VtZXJzZWNyZXQmc3Y9MCZ4PTk4" clientSecret = "1e6dd31880024c539cd96f3b86e704e91d28bfa9" yahooLeagueLoader = YahooLeagueLoader( "31171", [2021, 2022, 2023], clientId=clientId, clientSecret=clientSecret, loginTimeoutSeconds=4 ) league: League = yahooLeagueLoader.loadLeague()