Did anyone else's input fetching code break? I was...
# advent-of-code
n
Did anyone else's input fetching code break? I was even using it earlier today as I was moving solutions to a new repo and fetching inputs while testing. And not only that, but I have both Rust and Kotlin fetching solutions and they both return a 400 error. I've confirmed my session code and it's the correct URL. I wonder if Eric didn't like me downloading a bunch of inputs today or something (it was still something like 100).
a
I just tried this and it worked
Copy code
GET <https://adventofcode.com/2024/day/6/input>
Cookie: session=5...<many hex>...7
maybe you're getting rate-limited
j
My repository downloads single files if they are not downloaded, so guess you are rate-limited and it worked this morning.
r
n
My fetcher only downloads one file at a time, but I just ran it a lot yesterday as I transferred a bunch of puzzles to a new location and adopted different filename practices and such. It was still probably only a hundred requests over the course of an hour or so. Despite what that headline suggests he does allow automated downloading. I know because he has very specific rules on the settings. You need to provide a header saying where you’re downloading to and your email address so he can track you down if you’ve been a bad boy. Anyway, I’ll try again today and see if I was rate limited.
👍 1
hmm, still doesn't work. neither in Kotlin or Rust. I'm still skeptical that I did anything big enough to warrant special attention and don't want them to have to bother with me while running the event. I wonder if my request is somehow non-compliant and they tightened up the rules.
j
I wrote a fetch/cache API that has been working well for my friends and I: https://github.com/jsoberg/Kotlin-AoC-API it only fetches once and then reads from file to prevent hitting the server too much; maybe AoC starts 400'ing after a certain number of requests re: that reddit post and they've cracked down on it more?
n
NVM, my session ID did change. I had only checked the beginning and end, and the first 10 characters are the same and the last three chars are the same except for a b inverted to a d. I was sloppy and didn’t paste them side-by-side. Thanks everyone for trying to help!
j
Oh that is devious, nobody checks the middle
n
And yeah, mine does use a cache. Only I changed both the filename and organization structure so I thought it'd be easier to hit the server one at a time than muck around with bash scripts. And going forward this shouldn't be an issue as I finally figured out how to have a private Github submodule to store my inputs in.
d
You guys auto-fetch?
😂 6
🚫 1
e
I heavily rely on IDE file history cache. I copy paste the sample, provide solution which matches the expected output for the sample then override sample input with my specific input. For part 2, I just undo. And my input browser tab is always open.