mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 02:31:45 +01:00
fix: handle security message during ad update (#605)
This commit is contained in:
@@ -713,7 +713,8 @@ class KleinanzeigenBot(WebScrapingMixin):
|
|||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
await self.publish_ad(ad_file, ad_cfg, ad_cfg_orig, published_ads, AdUpdateStrategy.REPLACE)
|
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:
|
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)
|
await self.delete_ad(ad_cfg, published_ads, delete_old_ads_by_title = False)
|
||||||
@@ -980,7 +981,8 @@ class KleinanzeigenBot(WebScrapingMixin):
|
|||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
await self.publish_ad(ad_file, ad_cfg, ad_cfg_orig, published_ads, AdUpdateStrategy.MODIFY)
|
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("############################################")
|
||||||
LOG.info("DONE: updated %s", pluralize("ad", count))
|
LOG.info("DONE: updated %s", pluralize("ad", count))
|
||||||
|
|||||||
Reference in New Issue
Block a user