mirror of https://github.com/janLo/punkow
Adopt changes from scraper in the booker script
This commit is contained in:
parent
40a0c09384
commit
25be5e6cea
|
|
@ -35,8 +35,8 @@ if __name__ == "__main__":
|
||||||
logger.info("Try to get an appointment at %s", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
|
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)
|
data = BookingData(name=args.name, email=args.email)
|
||||||
svc = BookingService(url, debug=False)
|
svc = BookingService(url, debug=False)
|
||||||
for booked in svc.book(data):
|
booking = svc.book(data)
|
||||||
if data == booked:
|
if booking is not None:
|
||||||
break
|
break
|
||||||
time.sleep(max(30, args.interval))
|
time.sleep(max(30, args.interval))
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue