diff --git a/util/scrape.py b/util/scrape.py index e4ef3e1..9dd6eeb 100644 --- a/util/scrape.py +++ b/util/scrape.py @@ -12,7 +12,7 @@ from bs4 import BeautifulSoup load_dotenv() -def scrape_game_history(game: str, year: int | None = None) -> dict: +def scrape_game_history(game: str, year: int = utils.today().year) -> dict: """ Scrape game data from the url provided. This function requires specific environment variables be present in order to function properly. @@ -30,9 +30,6 @@ def scrape_game_history(game: str, year: int | None = None) -> dict: """ drawings = {} - if year is None: - year = utils.today().year - url = f"{os.getenv('BASE_SCRAPE_URL')}{game}/numbers/{year}" page = httpx.get(url) soup = BeautifulSoup(page.text, 'html.parser')