advent_of_code_2025

My (attempted) solutions to the 2025 Advent of Code
git clone https://git.eamoncaddigan.net/advent_of_code_2025.git
Log | Files | Refs | README

commit d733b17cc2fbb9b7109d8bced04696748fa3a242
parent 2667cb9f1c74814e781af0a7dbf2a4693da555c4
Author: Eamon Caddigan <ec@eamoncaddigan.net>
Date:   Tue,  9 Dec 2025 13:38:35 -0800

Add my email address as a User-Agent header for requests

I saw a request from the Advent of Code creator for people to make
themselves available for contact in the case of misbehaving scripts, so
I thought I'd comply. I _also_ saw that we're only supposed to make one
request every 15 minutes or so, and I haven't been great about. I'll do
better.

Diffstat:
Msrc/utils.R | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/utils.R b/src/utils.R @@ -4,7 +4,10 @@ aoc_input <- function(day, year = 2025) { } con <- url( sprintf("https://adventofcode.com/%d/day/%d/input", year, day), - headers = c("Cookie" = paste0("session=", readLines("~/.aoc"))) + headers = c( + "Cookie" = paste0("session=", readLines("~/.aoc")), + "User-Agent" = "ec@eamoncaddigan.net" + ) ) puzzle_input <- readLines(con) close(con)