Handle device verification message. Fixes #104

This commit is contained in:
sebthom
2022-12-07 19:28:49 +01:00
parent 2592d6a58e
commit c3eb4ecb9e

View File

@@ -360,7 +360,15 @@ class KleinanzeigenBot(SeleniumMixin):
self.handle_captcha_if_present("login-recaptcha", "but DON'T click 'Einloggen'.")
self.web_click(By.ID, "login-submit")
pause(800, 3000)
try:
self.web_find(By.ID, "new-device-login", 4)
LOG.warning("############################################")
LOG.warning("# Device verification message detected. Use the 'Login bestätigen' URL from the mentioned e-mail into the same browser tab.")
LOG.warning("############################################")
input("Press ENTER when done...")
except NoSuchElementException:
pass
def handle_captcha_if_present(self, captcha_element_id:str, msg:str) -> None:
try: