summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Sangdahl <[email protected]>2024-12-03 22:58:17 -0700
committerJack Sangdahl <[email protected]>2024-12-03 22:58:17 -0700
commitac6785b735a8e34f71e17c3ec823a4fcd58fb728 (patch)
tree98b88d113ab862074bc65c5dc8ccc8cb4071d5b8
parent2427744d262f13d0c3b9ba9d93bb7832a9d3099f (diff)
downloadaoc-ac6785b735a8e34f71e17c3ec823a4fcd58fb728.tar.gz
aoc-ac6785b735a8e34f71e17c3ec823a4fcd58fb728.zip
Chore: ignore vevn & update data fetcher
-rw-r--r--.gitignore1
-rwxr-xr-xdata.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1d17dae
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.venv
diff --git a/data.py b/data.py
index 2af199b..51fa029 100755
--- a/data.py
+++ b/data.py
@@ -7,10 +7,10 @@ from pathlib import Path
# from https://adventofcode.com/2022/day/12/input or any input page
# right click > inspect accessibility properties > network > reload
# under "file", click "input" request > cookies > copy 'session' id
-id = "53616c7465645f5f0aeeefb39c77e9a10d29c3d1b6cc63e4f846aa1c0f8fffa5034ab3c12ac0522e1f540dc394e379ad5a6a5a91874f0bbaca4eb7699a00b3c6"
+id = "53616c7465645f5fcd5b9a18a69a4ab874f367b422884a975cddb33dac42401df30be8e602ce986d28fe2502209d2d106254b106339e93608711d228ff22176d"
year = time.strftime("%Y")
hour = time.strftime("%H")
-day = int(time.strftime("%d"))
+day = int(time.strftime("%d")) + 1
cmd = f'curl https://adventofcode.com/{year}/day/{day}/input --cookie "session={id}"'
output = subprocess.check_output(cmd, shell=True)
output = output.decode("utf-8")