mirror of
https://github.com/janLo/punkow
synced 2026-06-19 15:38:00 +00:00
Adopt changes from scraper in the booker script
This commit is contained in:
@@ -35,9 +35,9 @@ if __name__ == "__main__":
|
||||
logger.info("Try to get an appointment at %s", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
|
||||
data = BookingData(name=args.name, email=args.email)
|
||||
svc = BookingService(url, debug=False)
|
||||
for booked in svc.book(data):
|
||||
if data == booked:
|
||||
break
|
||||
booking = svc.book(data)
|
||||
if booking is not None:
|
||||
break
|
||||
time.sleep(max(30, args.interval))
|
||||
except KeyboardInterrupt:
|
||||
logger.info("Got keyboard interrupt - stopping.")
|
||||
|
||||
Reference in New Issue
Block a user