Skip to content

vtsao/aoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

https://adventofcode.com

Programmatically retrieving a day's input file

Input is randomized for each user, so you need to be authenticated using your session cookie.

  1. Find session cookie on AoC site after logging in under Chrome Developer Tools -> Application -> Cookies.

  2. Create a file called .session with contents:

    session=YOUR_SESSION_COOKIE
  3. Run the following to programmatically retrieve the day's input:

    curl -b "$(cat .session)" -o dayXX_input.txt https://adventofcode.com/20XX/day/XX/input