From 82fd747cec94ce5e46049072205fbb5033fbb829 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sat, 3 Dec 2022 14:12:20 +0100 Subject: [PATCH] chore(input): deduce the day to be downloaded Signed-off-by: Matej Focko --- get_input.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/get_input.py b/get_input.py index dda729b..3deb62a 100755 --- a/get_input.py +++ b/get_input.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import datetime import yaml import requests import sys @@ -25,7 +26,9 @@ def get_input(session, year, day): def main(): - day = sys.argv[1] + day = datetime.datetime.now().day + if len(sys.argv) == 2: + day = sys.argv[1] session, year = load_config() problem_input = get_input(session, year, day)