When I write a bot like this I generally prefer using browser automation (like puppeteer). This requires less reverse engineering and is often a lot simpler and faster to implement.
Nice, I had to reserve a top restaurant in Rotterdam the Netherlands by email, I believe I failed because of ProtonMail's "Undo send" feature, which I believe just delays actually sending the mail (I cannot think of any other way it would do it). Frustrating, I wish they had a nice API so I could have my unfair advantage. Privacy is for nerds, and soon, all the best restaurants are too ;) (but kuddos to OP for sharing this code.)
I'm not OK with this. You're cheating, and encouraging others to do so because OpenTable lacks the savvy to prevent it. You can say, "Not my fault, OpenTable has no security," but that's just crass IMHO. Sure, you're using it for one reservation, but what's to prevent bots from hoarding and reselling? It's like the toilet paper hoarders of 2020. Or the stock-traders who kept buying property closer to the NYSE to trade faster (and were ultimately given server space on the floor). I hope OpenTable defeats this.
Bots hoarding and reselling reservations? This effects would become obvious to the restaurant's bottom line pretty quickly and, unlike high frequency trading, is highly disconnected from the actual process of sitting down, ordering, eating and paying.
It is assured this code will fail to run without exception in the future, as is the case for most code ever written.