Catch NoSuchElementException instead of BaseException

This commit is contained in:
sebthom
2022-03-12 19:55:20 +01:00
parent dfa5edeff0
commit 8437ca187a

View File

@@ -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"]: