Cookie
This commit is contained in:
parent
9a45b6c817
commit
2e4a4a8df5
|
@ -12,7 +12,7 @@ if [ -f "$f" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
url="https://adventofcode.com/$AOC_YEAR/day/$DAY/input"
|
url="https://adventofcode.com/$AOC_YEAR/day/$DAY/input"
|
||||||
cookie="$(cat "$HOME/.advent-of-code-auth-cookie")"
|
cookie="$(cat "$HOME/.advent-of-code-session-cookie")"
|
||||||
mkdir -p "$(dirname "$f")"
|
mkdir -p "$(dirname "$f")"
|
||||||
if curl --fail-with-body -X GET "$url" -H "Cookie:$cookie" > "$f"; then
|
if curl --fail-with-body -X GET "$url" -H "Cookie:$cookie" > "$f"; then
|
||||||
echo "Downloaded $url to $f"
|
echo "Downloaded $url to $f"
|
||||||
|
|
Loading…
Reference in a new issue