Correct call to get current year

This commit is contained in:
chris committed 2026-02-25 23:18:42 -05:00
1 parent 7da5cf2b29
commit 033b0cf028
1 file changed
+2 -2
+2 -2
View File
@@ -12,7 +12,7 @@ from bs4 import BeautifulSoup
load_dotenv() load_dotenv()
def scrape_game_history(game: str, year: int | None) -> dict: def scrape_game_history(game: str, year: int | None = None) -> dict:
""" """
Scrape game data from the url provided. This function requires specific environment variables be present Scrape game data from the url provided. This function requires specific environment variables be present
in order to function properly. in order to function properly.
@@ -31,7 +31,7 @@ def scrape_game_history(game: str, year: int | None) -> dict:
drawings = {} drawings = {}
if year is None: if year is None:
year = utils.now().year year = utils.today().year
url = f"{os.getenv('BASE_SCRAPE_URL')}{game}/numbers/{year}" url = f"{os.getenv('BASE_SCRAPE_URL')}{game}/numbers/{year}"
page = httpx.get(url) page = httpx.get(url)