- Create a file named
session
- Log In on Advent of Code website
- Open console (
Ctrl+Shift+i
or simplyF12
) - Go to
Storage
tab on Firefox orApplication
tab on Chrome based browser - In the sidebar find
Cookies
and locate the one that has your session stored - Copy that session to the file you created
- just run it with python3.7+ and it will tell you what you need to know to use it
- all of the dependencies (imports) should be built-in but as I am not sure run the script and you will probably get some errors
- The script creates a folder with the name of year fetched (if the foder doesn't currently exist)
- in the folder it will create 3 files (where {day} represents the day fetched):
{day}.py
- here is initial code with useful imports and separated functions for both parts of the challenge
- it is also already setup to split the input by lines or something else (depending on the input itself - you have to pick one!)
{day}_day
- here is the text (task) of the day fetched
{day}_input
- which holds the input data for you
- in addition the script will create a file with the exact time when it has fetched the day so you can track your time when solving
- Linux machine or wsl
- Sublime Text editor which could be open from said machine
This script should be used during the day you want to solve the problem because the aoc_main.sh
runs get_day.py
with current year and day and then opens everything it fetched in Sublime Text
- Try to execute previous script to see if everything works
- Run the script and results will be the same as running
get_day.py
but in addition Sublime Text opens files which were fetched
[1, 25]
[1, 25]
[1, 25]
[1, 25]
[1, 25]
[1, 25]
[1, 25]
[1, 25]
[1, 25]