Background: I want to make a reservation for a restaurant that opens its slots on the first day of every month at 10.00 am. However, the demand is so high for the restaurant that all slots become fully booked (I assume there are hundreds of people hitting F5 at the same time). I want to book the restaurant as part of proposing to my girlfriend -and while the engagement ring is almost here, I have been three times unsuccessful in booking that restaurant.
Additional information: The website (https://www.bokabord.se/r/frantzn/380) uses JSON requests to make the booking. I want to automize the first part, which is sending a request whether a reservation slot is still available for a given time and date (this is the part where everyone hits F5). The second part of the booking will be to write down the credit card details (+ name, address, etc.) -this part does not need to be automized anymore.
Potential solutions: So far, I can think of two solutions (please let me know if you are aware of more):
- A web browser that allows program JSON requests (or a plugin for common web browsers). The idea is to create a loop (that repeats every millisecond or so) and send a JSON request whether a reservation slot is available for a given time and date. If successful, the loop will finish and hand over the rest (writing down credit card details, etc.) to me. Question: Do you know such a web browser?
- I program an application with an integrated web browser to create a JSON request loop. I know a bit of Java (though not on a professional level), which would be most realistic for me to code in. Question: Do you know a library/example code/tutorial in Java for such an application? Doing it from scratch would be above my Java skills.
Thanks a lot!