From 0ed744dff89cf85e3e04b78b4666141195daaf82 Mon Sep 17 00:00:00 2001 From: Boyan Date: Wed, 12 Feb 2025 21:26:25 +0100 Subject: [PATCH] More "error handling" --- temmies/themis.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/temmies/themis.py b/temmies/themis.py index 2f56c67..78f4117 100644 --- a/temmies/themis.py +++ b/temmies/themis.py @@ -5,7 +5,7 @@ Main class for the Themis API using the new JSON endpoints. from requests import Session from selenium import webdriver from selenium.webdriver.common.by import By -from selenium.common.exceptions import NoSuchElementException +from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException from json import dumps from .year import Year import getpass @@ -113,7 +113,9 @@ class Themis: except NoSuchElementException: pass - + + except StaleElementReferenceException: + pass # destroy the password from memory (security) self.password = "I-HAVE-BEEN-REMOVED"