From 7b713095c3ec615da0bf55031b319891cf20858d Mon Sep 17 00:00:00 2001 From: DreckSoft <68750712+DreckSoft@users.noreply.github.com> Date: Fri, 20 Oct 2023 21:43:23 +0200 Subject: [PATCH] Fixes #220 --- kleinanzeigen_bot/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kleinanzeigen_bot/__init__.py b/kleinanzeigen_bot/__init__.py index 0c81101a..b13e7d5f 100644 --- a/kleinanzeigen_bot/__init__.py +++ b/kleinanzeigen_bot/__init__.py @@ -522,7 +522,10 @@ def publish_ad(self, ad_file:str, ad_cfg: dict[str, Any], ad_cfg_orig: dict[str, ############################# price_type = ad_cfg["price_type"] if price_type != "NOT_APPLICABLE": - self.web_select(By.XPATH, "//select[@id='price-type-react' or @id='micro-frontend-price-type' or @id='priceType']", price_type) + try: + self.web_select(By.XPATH, "//select[@id='price-type-react' or @id='micro-frontend-price-type' or @id='priceType']", price_type) + except NoSuchElementException: + pass if safe_get(ad_cfg, "price"): self.web_input(By.XPATH, "//input[@id='post-ad-frontend-price' or @id='micro-frontend-price' or @id='pstad-price']", ad_cfg["price"])