Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

jack-champagne/advent-of-code-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

(A)dvent (O)f (C)ode 2020 Downloader

This is a quick little download script I wrote to help automate the task of downloading inputs for Advent of Code Prequesites: python's requests module

To download advent of code input files, you will need to provide your user's cookie that the site uses to identify you (each person has different puzzles) You can either specify that in a file called my-cookie.txt or you can edit the source code so that session_cookie = 'my cookie string'

You can find what your session cookie is by:

  • Going to the webpage and opening developer/inspect element menu

  • Chrome and Firefox: Go to network tab and reload

  • For Chrome: Click on the first entry (Name should be adventofcode.com)

  • For Chrome: Scroll down to subsection labeled 'Request Headers' and there should be a tag in there called 'cookie'. Copy everything after the colon.

  • For Firefox: Click on first entry (Domain should be adventofcode.com)

  • For Firefox: Scroll down to subsection labeled 'Request Headers' and there should be a tag in there called 'Cookie'. Copy everything after the colon.

There's your cookie! Hold on to it and don't eat it till the holidays are over!

For usage, peek inside of aoc.py!

Author: Jack Champagne