summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xskripti/poprbot.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/skripti/poprbot.py b/skripti/poprbot.py
index c10fdbf..a32101d 100755
--- a/skripti/poprbot.py
+++ b/skripti/poprbot.py
@@ -58,6 +58,7 @@ def main():
return
sleep(180)
sleep((kdaj-datetime.now()).total_seconds()-3)
+ retries = 0
while True:
prijavi_se(s, event, slotid)
if (kdaj-datetime.now()).total_seconds() < -3:
@@ -66,6 +67,10 @@ def main():
print("Prijavljeni ste.")
return
else:
+ if ev["slots"][slot]["bookable"] == False:
+ retries += 1
+ if retries < 10:
+ continue
print("NAPAKA! Niste prijavljeni.")
return
prijavi_se(s, event, slotid)