Skip to content

Commit

Permalink
UPDATE wait for user interaction to solve captcha on publishing ad (c…
Browse files Browse the repository at this point in the history
…loses #301)
  • Loading branch information
provinzio authored and sebthom committed May 30, 2024
1 parent b30867c commit 72283bf
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/kleinanzeigen_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,19 @@ async def publish_ad(self, ad_file:str, ad_cfg: dict[str, Any], ad_cfg_orig: dic
#############################
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
#############################
Expand Down

0 comments on commit 72283bf

Please sign in to comment.