fix: исправлены локаторы для индикации окна с картинками

This commit is contained in:
protokey committed 2026-09-18 16:21:43 +04:00
1 parent ce68d2727c
commit b77f25d3cd
1 file changed
+2 -2
+2 -2
View File
@@ -27,7 +27,7 @@ class ReCaptchaSolver(Solver):
async with page.expect_response("**/recaptcha/enterprise/reload**", timeout=30_000): async with page.expect_response("**/recaptcha/enterprise/reload**", timeout=30_000):
await element.click() await element.click()
else: else:
element = page.locator("body > div:nth-child(2) > div:nth-child(1)") element = page.locator("//div[@class='g-recaptcha-bubble-arrow']/../div[1]")
if await element.is_visible(): if await element.is_visible():
await element.click() await element.click()
@@ -39,7 +39,7 @@ class ReCaptchaDetector(Detector):
async def detect(self, page: Page, info: ChallengeInfo): async def detect(self, page: Page, info: ChallengeInfo):
info.meta = {} info.meta = {}
checkbox_selector = "#recaptcha-anchor" checkbox_selector = "#recaptcha-anchor"
interactive_marker_selector = "body > div:nth-child(2) > div:nth-child(4) > iframe:nth-child(1)" interactive_marker_selector = "#rc-imageselect"
# попытка определить что мы вообще на странице блокировки # попытка определить что мы вообще на странице блокировки
marker_selector = info.detect_locator or "#captcha-form" marker_selector = info.detect_locator or "#captcha-form"