File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ if [[ -z "$DAY" ]]; then
20
20
print -u 2 " Non-numeric year/day $1 /$2 "
21
21
exit 1
22
22
fi
23
+ # Include contact information per requst from @topaz
24
+ USER_AGENT=
" https://github.com/flwyd/adventofcode by [email protected] "
23
25
COOKIES=" $BASEDIR /.cookie-jar"
24
26
if [[ ! -s " $COOKIES " ]]; then
25
27
print -u 2 " Who stole the cookies from ${COOKIES} ?"
@@ -33,4 +35,4 @@ if [[ "$SERVERDAY" < "$TARGETDAY" ]]; then
33
35
fi
34
36
URL=" https://adventofcode.com/$YEAR /day/$DAY /input"
35
37
print -u 2 " Fetching $URL "
36
- curl -f -b " $COOKIES " " $URL "
38
+ curl -f -b " $COOKIES " -A " $USER_AGENT " " $URL "
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ if [[ -z "$DAY" ]]; then
20
20
print -u 2 " Non-numeric year/day $1 /$2 "
21
21
exit 1
22
22
fi
23
+ # Include contact information per requst from @topaz
24
+ USER_AGENT=
" https://github.com/flwyd/adventofcode by [email protected] "
23
25
COOKIES=" $BASEDIR /.cookie-jar"
24
26
if [[ ! -s " $COOKIES " ]]; then
25
27
print -u 2 " Who stole the cookies from ${COOKIES} ?"
@@ -33,4 +35,4 @@ if [[ "$SERVERDAY" < "$TARGETDAY" ]]; then
33
35
fi
34
36
URL=" https://adventofcode.com/$YEAR /day/$DAY /input"
35
37
print -u 2 " Fetching $URL "
36
- curl -f -b " $COOKIES " " $URL "
38
+ curl -f -b " $COOKIES " -A " $USER_AGENT " " $URL "
You can’t perform that action at this time.
0 commit comments