From f23deb97e9ba6b178c7fb8bb950c86393b4ae807 Mon Sep 17 00:00:00 2001 From: David Ashby Date: Thu, 1 Dec 2022 08:07:30 -0500 Subject: [PATCH] be a good neighbor and set my user-agent header https://www.reddit.com/r/adventofcode/comments/z9dhtd/please_include_your_contact_info_in_the_useragent/ --- new.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/new.sh b/new.sh index ebd58c6..ca742a3 100755 --- a/new.sh +++ b/new.sh @@ -7,7 +7,9 @@ if [ "${1}" != "" ]; then mkdir -p ${padded}/inputs touch ${padded}/inputs/testinput if [ ! -f "${padded}/inputs/input" ]; then - curl -s -H "Cookie: session=`cat .cookie`" https://adventofcode.com/${__year}/day/${1##0}/input > "${padded}/inputs/input" + curl -s \ + -A "https://git.yetaga.in/alazyreader/AdventOfCode2022/" \ + -H "Cookie: session=`cat .cookie`" https://adventofcode.com/${__year}/day/${1##0}/input > "${padded}/inputs/input" fi if [ ! -f "${padded}/main.rs" ]; then cp -n main.rs.tmpl ${padded}/main.rs