From b94661c4d55d4bef86216db2a8e650ac6e9bac29 Mon Sep 17 00:00:00 2001 From: Heavenfighter <33938595+Heavenfighter@users.noreply.github.com> Date: Tue, 12 Aug 2025 19:28:19 +0200 Subject: [PATCH] fix: handle security message during ad update (#605) --- src/kleinanzeigen_bot/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kleinanzeigen_bot/__init__.py b/src/kleinanzeigen_bot/__init__.py index 8a7e3a2..8bc92d1 100644 --- a/src/kleinanzeigen_bot/__init__.py +++ b/src/kleinanzeigen_bot/__init__.py @@ -713,7 +713,8 @@ class KleinanzeigenBot(WebScrapingMixin): count += 1 await self.publish_ad(ad_file, ad_cfg, ad_cfg_orig, published_ads, AdUpdateStrategy.REPLACE) - await self.web_await(lambda: self.web_check(By.ID, "checking-done", Is.DISPLAYED), timeout = 5 * 60) + await self.web_await(lambda: self.web_check(By.ID, "checking-done", Is.DISPLAYED) or + self.web_check(By.ID, "not-completed", Is.DISPLAYED), timeout=5 * 60) if self.config.publishing.delete_old_ads == "AFTER_PUBLISH" and not self.keep_old_ads: await self.delete_ad(ad_cfg, published_ads, delete_old_ads_by_title = False) @@ -980,7 +981,8 @@ class KleinanzeigenBot(WebScrapingMixin): count += 1 await self.publish_ad(ad_file, ad_cfg, ad_cfg_orig, published_ads, AdUpdateStrategy.MODIFY) - await self.web_await(lambda: self.web_check(By.ID, "checking-done", Is.DISPLAYED), timeout = 5 * 60) + await self.web_await(lambda: self.web_check(By.ID, "checking-done", Is.DISPLAYED) or + self.web_check(By.ID, "not-completed", Is.DISPLAYED), timeout = 5 * 60) LOG.info("############################################") LOG.info("DONE: updated %s", pluralize("ad", count))