Quick and dirty code that check an event on TicketSwap for available tickets. When a ticket comes available to script will try to book (not pay) the ticket. The final checkout url will be shown in a browser and you will have 10 minutes to make the payment, otherwise you'll lose the booking.
Replace endpoint_rw with url of your likings