This week I built a scraper to get me the perfect dinner table reservation at a high end restaurant.

Tool I used:
Poking around the website
A python script
Email
Patience (but not too much)
Context
It was recently P’s birthday, and I wanted to treat her to one of her favourite restaurants in Mexico City. The trouble is, this restaurant needed to be booked 1-2 months in advance, and, classic, I forgot to plan that far in advance.
Perhaps because they are always booked out, they haven’t invested heavily in a friendlier booking interface. They happily tell you when your time isn’t available, and give you suggestions for dates in the future - but after playing around with it I discovered that they don’t give you full information.

Depending on the date and time you select for your initial booking request, you get different results back for the upcoming availability. Also, they have an ‘email me’ waitlist feature, but you can only select an entire day, and there seemed to be a lag, so that each time they notified me of a cancellation someone else had already swooped in and taken the booking.
I needed a way to stay ahead so I would be the one swooping.
Process
The first thing I did was try manually on the website over a few days, picking different dates and times and seeing what results I got back. I quickly discovered this wasn’t sustainable.
It was easy enough to inspect the page and discover their reservation system is built with Covermanager - and that each time you request availability it pings
reservation/searchRestaurantCrosselingFuture
After browsing their API reference, I cobbled together a python script to ping that with appropriate headers and date. I needed to request different availability at all the times that I cared about and combine them together.

Finally, I actually only cared about dates and times within a certain time window (the birthday week, ideally 6pm). I set up a filter on the returned times that would email me an alert if one of my target slots became available.

Clicking on one of the links in this email took me straight to the booking page for that time and date. I had this run every 30 minutes, and after just a few days of seeing cancellations in near-real time, I lucked out and got the exact date of her birthday at 6pm. Success!
Learnings
A few years ago I started getting into movement, started lifting weights, climbing things, and I realised I had a new capability, something like ‘body awareness’ or ‘body empathy’ - specifically my body in relationship with the environment. I was able to look at a tree, a rock, an exercise, and have a pretty good idea if I could do it before attempting. I certainly was able to visualize how I’d do it. It felt like a superpower (and still does!).
Recently, I’ve started to have a similar thing but with software projects (or specifically challenges that could be solved with software + AI tools). Eg before Week 42, I saw the AI generated image exhibit at Mutek, and had an idea of how I might do it (and then I did it). Same with this week, I was struggling with the booking system, and then realised I could build something (and I did!)
Next steps
- Now that I have a hammer… try not to see everything as a nail