Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There is a specific small hotel that will remain unnamed, which my partner wanted to book for a long long time. At any given moment if you check the reservations page, it is most likely booked for two years solid. It is famous enough that people book it all the time, but it has lenient cancellation policy of 100% refund if cancelled before 2 weeks. This is not really a problem for them as these vacancies get booked in a matter of hours (as I found out).

I wrote a script on top of Puppeteer that would be called from crontab on my home server, to go to the reservation page, press the buttons to flip through the calendar and extract days with vacancy (the reservation app is an SPA). When there were new vacancies it would send me a message through one of the messaging APIs about new dates available, so I could see if it aligns with our schedule and book immediately from the phone wherever I am.

That actually worked like a charm and I snatched a very convenient reservation after few days.



I've done this to get consulate appointments for visas as well. Was able to reduce from a 30-day wait to ~5 days.


Was the hotel in NZ? And do you work on a three headed beast?


No, and - not sure I understand the question - but most likely, also no.


I think it's a reference to New Zealand's Managed Isolation and Quarantine system during the pandemic. Demand was far higher than availability (and quarantine was mandatory to return home from overseas), so at some point someone wrote a script to book rather than just hitting refresh. Soon, everyone was using it and they were forced to move to a lottery system instead.


A colleague of mine built almost the exact same hack to reserve a hotel in nz mid last year, I was wondering if you were him




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: