-
Notifications
You must be signed in to change notification settings - Fork 0
/
checker.py
31 lines (25 loc) · 834 Bytes
/
checker.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import random
from time import sleep
from working_data import chechek_account, selenium_driver_path
from canada_visa import VFSBot
from helpful_scripts import telegram_bot_sendtext
def main():
try:
slots_available = False
cycles = 0
mail, psw, application = chechek_account
bot = VFSBot(selenium_driver_path, mail, psw, application)
bot.enter_account()
while not slots_available:
cycles += 1
bot.retrieve_appointment()
if bot.is_there_available_slots():
slots_available = True
if cycles % 20 == 0:
bot.reload_driver()
sleep(random.randint(60, 100))
telegram_bot_sendtext("SLOTS AVAILABLE")
except Exception as err:
print(err)
if __name__ == '__main__':
main()