mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-13 02:51:49 +01:00
fix: Handle email verification dialog (#782)
This commit is contained in:
@@ -863,11 +863,22 @@ class KleinanzeigenBot(WebScrapingMixin): # noqa: PLR0904
|
||||
LOG.warning("############################################")
|
||||
LOG.warning("# Device verification message detected. Please follow the instruction displayed in the Browser.")
|
||||
LOG.warning("############################################")
|
||||
await ainput("Press ENTER when done...")
|
||||
await ainput(_("Press ENTER when done..."))
|
||||
except TimeoutError:
|
||||
# No SMS verification prompt detected.
|
||||
pass
|
||||
|
||||
try:
|
||||
email_timeout = self._timeout("email_verification")
|
||||
await self.web_find(By.TEXT, "Um dein Konto zu schützen haben wir dir eine E-Mail geschickt", timeout = email_timeout)
|
||||
LOG.warning("############################################")
|
||||
LOG.warning("# Device verification message detected. Please follow the instruction displayed in the Browser.")
|
||||
LOG.warning("############################################")
|
||||
await ainput(_("Press ENTER when done..."))
|
||||
except TimeoutError:
|
||||
# No email verification prompt detected.
|
||||
pass
|
||||
|
||||
try:
|
||||
LOG.info("Handling GDPR disclaimer...")
|
||||
gdpr_timeout = self._timeout("gdpr_prompt")
|
||||
|
||||
@@ -153,6 +153,7 @@ class TimeoutConfig(ContextualModel):
|
||||
page_load:float = Field(default = 15.0, ge = 1.0, description = "Page load timeout for web_open.")
|
||||
captcha_detection:float = Field(default = 2.0, ge = 0.1, description = "Timeout for captcha iframe detection.")
|
||||
sms_verification:float = Field(default = 4.0, ge = 0.1, description = "Timeout for SMS verification prompts.")
|
||||
email_verification:float = Field(default = 4.0, ge = 0.1, description = "Timeout for email verification prompts.")
|
||||
gdpr_prompt:float = Field(default = 10.0, ge = 1.0, description = "Timeout for GDPR/consent dialogs.")
|
||||
login_detection:float = Field(default = 10.0, ge = 1.0, description = "Timeout for detecting existing login session via DOM elements.")
|
||||
publishing_result:float = Field(default = 300.0, ge = 10.0, description = "Timeout for publishing result checks.")
|
||||
@@ -218,7 +219,7 @@ class DiagnosticsConfig(ContextualModel):
|
||||
|
||||
def _validate_glob_pattern(v:str) -> str:
|
||||
if not v.strip():
|
||||
raise ValueError("must be a non-empty, non-blank glob pattern")
|
||||
raise ValueError(_("must be a non-empty, non-blank glob pattern"))
|
||||
return v
|
||||
|
||||
|
||||
|
||||
@@ -603,6 +603,8 @@ kleinanzeigen_bot/model/config_model.py:
|
||||
"amount must be specified when auto_price_reduction is enabled": "amount muss angegeben werden, wenn auto_price_reduction aktiviert ist"
|
||||
"min_price must be specified when auto_price_reduction is enabled": "min_price muss angegeben werden, wenn auto_price_reduction aktiviert ist"
|
||||
"Percentage reduction amount must not exceed %s": "Prozentuale Reduktionsmenge darf %s nicht überschreiten"
|
||||
_validate_glob_pattern:
|
||||
"must be a non-empty, non-blank glob pattern": "muss ein nicht-leeres Glob-Muster sein"
|
||||
_validate_pause_requires_capture:
|
||||
"pause_on_login_detection_failure requires login_detection_capture to be enabled": "pause_on_login_detection_failure erfordert, dass login_detection_capture aktiviert ist"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user