UPDATE wait for user interaction to solve captcha on publishing ad (closes Second-Hand-Friends/kleinanzeigen-bot#301)

This commit is contained in:
Jeppy
2024-05-30 13:23:12 +02:00
committed by Sebastian Thomschke
parent b30867ca48
commit 72283bf069

View File

@@ -611,6 +611,19 @@ class KleinanzeigenBot(WebScrapingMixin):
#############################
await self.__upload_images(ad_cfg)
#############################
# wait for captcha
#############################
try:
await self.web_find(By.CSS_SELECTOR,"iframe[name^='a-'][src^='https://www.google.com/recaptcha/api2/anchor?']", timeout=2)
LOG.warning("############################################")
LOG.warning("# Captcha present! Please solve the captcha.")
LOG.warning("############################################")
await self.web_scroll_page_down()
input("Press a key to continue...")
except TimeoutError:
pass
#############################
# submit
#############################