This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Advent of Code template by @MathisHammel | |
import requests | |
from aoc_secrets import AOC_COOKIE # Put your session cookie in this variable | |
YEAR = '2022' | |
def get_input(day): | |
req = requests.get(f'https://adventofcode.com/{YEAR}/day/{day}/input', headers={'cookie':'session='+AOC_COOKIE}) | |
return req.text |