Pandemic Journal, Day 670

I use Tripit to keep track of our trips – that means I have only one place to go if I want information about upcoming (or past) travels. But it’s nice to have some of the information on our calendars, too – not every little gory detail, but the big things, like start/end dates of a trip and flight info. So I wrote a program to extract selected info from Tripit and put it on the calendar.

And then I rewrote it in September to use a MySQL database to keep track of changes so that I could tell what was happening, especially when the airlines make changes to flights. All was well.

Until October 27, when the program stopped working – Tripit rejected my requests with a “403 – Not Authorized” HTTP error. I hadn’t made any changes to the program for weeks, so I filed a bug report and went on about my life. I wasn’t traveling (much) so not having the calendar get updated wasn’t a big deal.

But now that we’re starting to book travel again, I was getting seriously annoyed. So I spent some time tonight figuring out what was going on, and I eventually figured it out – there was an incompatibility between the Tripit server and the Python code they’d supplied to access it. In particular, the server was rejecting requests which included the default User-Agent set by the Python library. I modified Tripit’s code to explicitly set the User-Agent to match a typical browser, and everything worked again.

What a pain!