So I found myself with a few spare minutes this week, so I decided to try to use Panorama X to solve the puzzles in this year’s Advent of Code challenge. Basically, it’s a new puzzle each day that one solves by coding something up to compute a result from some initial data provided on a web page.
I know how to grab the data I need from a web page, the problem is that every user gets unique data (and must be logged in to get it), so when i send Panorama to that page to slurp up the data, it fails because the panorama request is seen as a new session. i could make a browser object and log in that way, but i’d prefer to just hardcode my credentials into a Panorama procedure and use it to grab the data, authenticating as necessary. (it’s not really a high security situation-I get that this is generally regarded a terrible practice.) I’m pretty good at Panorama coding but i am woefully ignorant of most HTML. I know this can be done in Panorama - can anyone point me in the right direction to figure this out?
This is what the authentication page looks like:
I’m happy to do most of the figuring out- I just need somewhere to start…
I feel like i’ve seen this answer before, i just can’t find it
This little coding challenge is a fantastic way to refresh one’s Panorama skills- and so far the problems are fun, and not too easy. For example, day one had us finding the first and last digits of strings like this:
the catch… is that numbers expressed as words count, too. And to complicate matters, entries like the third one above translate to “18234”-- the string contains “one” and “eight”, but they overlap! This stumped me for a minute. My solution was a total hack, but it worked
If you’re a geeky scrooge like me, it’s like procrastination with benefits
I want to know the name of the law that says “previously invisible search results only appear after one has asked the same question in a public forum”
I haven’t tested it yet but it looks like
is what I’m looking for.
You didn’t write back, so maybe your last post was the solution you were looking for. But I kind of doubt it. That solution will work for web sites that do there own authentication thru HTTP protocol. However, not many web sites use that system these days, and it sounds like advent of code does not - here is what their FAQ page says.
If you are still stuck, what you might try is making a form with a web browser object, and using that browser to log into Advent of Code. I assume that will set up cookies that store the login information. Then when you use the url( function, it will share the same cookies with the web browser object, so you will be able to access the pages you want.
Hmm, apparently there is a JSON API for Advent of Code. I couldn’t find the main documentation page for it, but here is somewhere you can start in your research. Since Panorama X supports JSON, it should be possible to use this API.
Wow thank you.
I hadn’t seen that page, but i eventually took the ‘manual download & cache it’ approach and coded accordingly .