diff --git a/README.md b/README.md index 3d12d19..1087a7f 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,10 @@ Client → Caddy (TLS) → FastAPI → API-key auth → semaphore acquire ``` src/ main.py # FastAPI app + router wiring + config.py # settings (env vars) api/ solve.py # POST /v1/solve deps.py # API-key auth dependency - core/ - config.py # settings (env vars) engine/ browser.py # Camoufox context pool + semaphore actions.py # fill / click / wait_for execution @@ -64,14 +63,17 @@ X-API-Key: { "captcha": "token", "url": "https://example.com/login", - "actions": [ + "actions": [ {"type": "fill", "selector": "#email", "value": "user@example.com"}, {"type": "fill", "selector": "#password", "value": "..."}, + {"type": "mouse_move", "selector": "#submit"}, {"type": "click", "selector": "#submit"}, - {"type": "wait_for", "selector": ".dashboard", "timeout_ms": 30000} + {"type": "wait_for", "selector": ".dashboard", "timeout": 30} ], - "proxy": "http://user:pass@host:port", - "timeout_ms": 120000 + "proxy": "socks5://user:pass@host:port", + "screen": "1280x920", + "user-agent": "Firefox", + "timeout": 120 } ``` @@ -114,7 +116,7 @@ On failure, `status` is `"error"` and `error` carries a machine-readable reason Fill команда включает 3 действия -1. `{"type": "locate", "selector": "#email"},` - навести мышку на элемент +1. `{"type": "mouse_move", "selector": "#email"},` - навести мышку на элемент 2. `{"type": "click"},` - клик в текущие координаты 3. `{"type": "typing", "value": "user@example.com"},` - набор текста diff --git a/test/test_main.http b/tests/test_main.http similarity index 100% rename from test/test_main.http rename to tests/test_main.http