Is there a way to retrieve input files directly fr...
# advent-of-code
k
Is there a way to retrieve input files directly from cURL or from openConnection ? I want to try previous years AOC and copying the input is kind of tedious. 馃槄 Just curious!
a
You need to be authenticated to get your specific input so that could make it difficult
k
is there a way to use the browser's cookie or session data?
j
sure
cookie string like
session=53616c74.....
馃 1
馃憤馃徎 3
(this is JVM but you'll get the idea how to make it in curl. header is named
Cookie
)
e
(only works on linux, not macos) assuming cookie value is in ~/.aocrc file or SESSION=,
make
downloads all available inputs for the given YEAR=. skips any inputs that already exist or future inputs
if you explicitly ask for
make day25.txt
it'll wait until then
k
Nice @ephemient. But I have a Mac. Also @Jakub Gw贸藕d藕 answer works fine.