Correct call to get current year
This commit is contained in:
1 parent
7da5cf2b29
commit
033b0cf028
1 file changed
+2
-2
+2
-2
@@ -12,7 +12,7 @@ from bs4 import BeautifulSoup
|
||||
|
||||
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
|
||||
in order to function properly.
|
||||
@@ -31,7 +31,7 @@ def scrape_game_history(game: str, year: int | None) -> dict:
|
||||
drawings = {}
|
||||
|
||||
if year is None:
|
||||
year = utils.now().year
|
||||
year = utils.today().year
|
||||
|
||||
url = f"{os.getenv('BASE_SCRAPE_URL')}{game}/numbers/{year}"
|
||||
page = httpx.get(url)
|
||||
|
||||
Reference in new issue
Block a user