fix: reCAPTCHA — окно с картинками определяется по положению (#10)

- Маркер интерактивного челленджа: iframe bframe, контейнер которого не стоит
  за экраном (top: -10000px); click_and_race ждёт видимости, а не появления в DOM.
- Маркер наличия капчи берётся из исходного HTML (api.js / enterprise.js,
  .g-recaptcha, iframe чекбокса), проверка мгновенная, без ожидания iframe.
- SolverReCaptcha ждёт detect_locator в DOM, а не видимости (script невидим).
- test_main.http: секреты вынесены в http-client.private.env.json, запрос
  на стенд zennolab, исправлены XPath с @class.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
protokeyandClaude Opus 5.5 committed 2026-10-14 00:30:29 +04:00
1 parent fdee12e2d8
commit 4d90dc4a21
7 files changed
+67 -19

No files matched your search

+35 -8
View File
@@ -1,4 +1,6 @@
# Test your FastAPI endpoints
# Секреты (api_key, proxy, captcha_key) — в tests/http-client.private.env.json (не в git, шаблон —
# http-client.private.env.example.json); окружение dev выбирается в PyCharm над запросом.
GET http://127.0.0.1:8000/
Accept: application/json
@@ -13,7 +15,7 @@ Accept: application/json
POST http://127.0.0.1:8000/v1/solve
Accept: application/json
Content-Type: application/json
X-API-Key: <key>
X-API-Key: {{api_key}}
{
@@ -36,7 +38,7 @@ X-API-Key: <key>
POST http://127.0.0.1:8000/v1/solve
Accept: application/json
Content-Type: application/json
X-API-Key: <key>
X-API-Key: {{api_key}}
Cookie: session_id=2f2100be-6ce7-40d5-bae5-61424b2504c8; Path=/; SameSite=lax
@@ -53,7 +55,7 @@ Cookie: session_id=2f2100be-6ce7-40d5-bae5-61424b2504c8; Path=/; SameSite=lax
POST http://127.0.0.1:8000/v1/solve
Accept: application/json
Content-Type: application/json
X-API-Key: <key>
X-API-Key: {{api_key}}
Cookie: session_id=2f2100be-6ce7-40d5-bae5-61424b2504c8; Path=/; SameSite=lax
@@ -72,7 +74,7 @@ Cookie: session_id=2f2100be-6ce7-40d5-bae5-61424b2504c8; Path=/; SameSite=lax
POST http://127.0.0.1:8000/v1/solve
Accept: application/json
Content-Type: application/json
X-API-Key: <key>
X-API-Key: {{api_key}}
Cookie: session_id=2f2100be-6ce7-40d5-bae5-61424b2504c8; Path=/; SameSite=lax
@@ -91,7 +93,7 @@ Cookie: session_id=2f2100be-6ce7-40d5-bae5-61424b2504c8; Path=/; SameSite=lax
POST http://127.0.0.1:8000/v1/solve
Accept: application/json
Content-Type: application/json
X-API-Key: <key>
X-API-Key: {{api_key}}
{
@@ -112,11 +114,11 @@ X-API-Key: <key>
POST http://localhost:8002/v2/tasks
Accept: application/json
Content-Type: application/json
X-API-Key: <key>
X-API-Key: {{api_key}}
{
"url": "https://freelancehunt.com/",
"proxy": "http://BQLo3X:poqAWX@168.81.43.154:8000",
"proxy": "{{proxy}}",
"actions": [
{
"type": "inner_text",
@@ -132,6 +134,31 @@ X-API-Key: <key>
GET http://localhost:8002/v2/tasks/4d8105f8-93a8-43ee-aa6e-db917451363b
Accept: application/json
Content-Type: application/json
X-API-Key: <key>
X-API-Key: {{api_key}}
###
# @timeout 600
POST http://localhost:8010/v1/solve
Accept: application/json
Content-Type: application/json
X-API-Key: {{api_key}}
{
"url": "https://lessons.zennolab.com/captchas/recaptcha/v2_nosubmit.php?level=low",
"proxy": "{{proxy}}",
"actions": [
{
"type": "pass_challenge",
"value": "recaptcha"
},
{
"type": "inner_text",
"selector": "//button[contains(@class, 'actionItem_151') and @type='submit']"
}
],
"captcha": "{{captcha_key}}",
"captcha_type": "recaptcha",
"captcha_success_locator": "//code[contains(@class, 'hljs _successMessageCode')]"
}
###