fix: handle security message during ad update (#605)

This commit is contained in:
Heavenfighter
2025-08-12 19:28:19 +02:00
committed by GitHub
parent 6f4a4e319d
commit b94661c4d5

View File

@@ -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))