From 8437ca187a75d7e9af8ecb1d3fb06751d3ed84f0 Mon Sep 17 00:00:00 2001 From: sebthom Date: Sat, 12 Mar 2022 19:55:20 +0100 Subject: [PATCH] Catch NoSuchElementException instead of BaseException --- kleinanzeigen_bot/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kleinanzeigen_bot/__init__.py b/kleinanzeigen_bot/__init__.py index 2bce235..3974a03 100644 --- a/kleinanzeigen_bot/__init__.py +++ b/kleinanzeigen_bot/__init__.py @@ -400,7 +400,7 @@ class KleinanzeigenBot(SeleniumMixin): try: self.web_find(By.XPATH, "//*[@id='postad-category-path'][text()]") is_category_auto_selected = True - except BaseException: + except NoSuchElementException: is_category_auto_selected = False if ad_cfg["category"]: