From: Jan "Yenya" Kasprzak Date: Thu, 1 Dec 2022 08:18:46 +0000 (+0100) Subject: get.sh: user-agent added X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=493f9559c10eeb22026457a2c38446fbf4ec0362;p=aoc.git get.sh: user-agent added ... as requested at https://www.reddit.com/r/adventofcode/comments/z9dhtd/please_include_your_contact_info_in_the_useragent/ --- diff --git a/2022/get.sh b/2022/get.sh index c8eda78..3c5b5ec 100755 --- a/2022/get.sh +++ b/2022/get.sh @@ -5,6 +5,7 @@ URLDAY=`echo $DAY|sed 's/^0//'` test -n "$1" && DAY="$1" FILE="$((2*DAY - 1))in.txt" COOKIE=`cat cookie` +UA="User-Agent: kas at yenya.net, https://www.fi.muni.cz/~kas/git/aoc.git" START="6:00:02" MAXWAIT=300 @@ -21,7 +22,7 @@ fi URL="https://adventofcode.com/2022/day/$URLDAY/input" echo echo "Downloading $URL to $FILE" -curl -s -b "$COOKIE" "$URL" --output "$FILE" +curl -s -b "$COOKIE" -A "$UA" "$URL" --output "$FILE" echo ======================================================================== cat "$FILE" echo ========================================================================