Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import sys
- import requests
- import ctypes
- from selenium.webdriver.chrome.options import Options
- from bcncita import CustomerProfile, DocType, Office, OperationType, Province, try_cita
- import bcncita.speaker
- bcncita.speaker = lambda: None
- if __name__ == "__main__":
- customer = CustomerProfile(
- anticaptcha_api_key="...",
- auto_captcha=False,
- auto_office=True,
- chrome_driver_path=r"C:\CITA-BOT\cita-bot-master\chromedriver",
- save_artifacts=True,
- province=Province.MÁLAGA,
- operation_code=OperationType.TOMA_HUELLAS,
- doc_type=DocType.NIE,
- doc_value="Y0671800F",
- country="PARAGUAY",
- name="MARIA CECILIA MEZA COLMAN",
- phone="649365093",
- email="[email protected]",
- offices=[],
- )
- options = Options()
- options.add_experimental_option("debuggerAddress", "127.0.0.1:9222")
- bcncita.cita.chrome_options = options
- def my_custom_alert(phrase):
- if "ALARM" in phrase:
- ctypes.windll.user32.MessageBoxW(0, "SLOT FOUND! Check Chrome NOW!", "CITA ALERT", 1)
- try:
- requests.post('https://textbelt.com/text', {
- 'phone': '+34649365093',
- 'message': 'CITA BOT: Appointment found in Malaga!',
- 'key': 'textbelt',
- })
- except:
- pass
- import bcncita.cita
- bcncita.speaker.say = my_custom_alert
- try_cita(context=customer, cycles=200)
Add Comment
Please, Sign In to add comment