Skip to content

Instantly share code, notes, and snippets.

View eivindbergem's full-sized avatar

Eivind Alexander Bergem eivindbergem

View GitHub Profile
@eivindbergem
eivindbergem / aoc.py
Last active December 6, 2017 12:42
AoC input downloader
import os.path
import requests
SESSION_COOKIE = "" # Add your session cookie here
URL = "http://adventofcode.com/2017/day/{}/input"
def download(day, filename):
r = requests.get(
URL.format(day),
cookies=dict(session=SESSION_COOKIE))