# 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 ### GET http://127.0.0.1:8000/hello/User Accept: application/json ### POST http://127.0.0.1:8000/v1/solve Accept: application/json Content-Type: application/json X-API-Key: {{api_key}} { "captcha": "token", "url": "https://example.com/login", "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": 30} ], "proxy": "socks5://user:pass@host:port", "screen": "1280x920", "user_agent": "Firefox", "timeout": 120 } ### POST http://127.0.0.1:8000/v1/solve Accept: application/json Content-Type: application/json X-API-Key: {{api_key}} Cookie: session_id=2f2100be-6ce7-40d5-bae5-61424b2504c8; Path=/; SameSite=lax { "url": "https://browserleaks.com/canvas", "proxy": "-", "actions": [ {"type": "wait_for", "selector": "#canvas-hash", "timeout": 10}, {"type": "inner_html", "selector": "#canvas-hash"} ] } ### POST http://127.0.0.1:8000/v1/solve Accept: application/json Content-Type: application/json X-API-Key: {{api_key}} Cookie: session_id=2f2100be-6ce7-40d5-bae5-61424b2504c8; Path=/; SameSite=lax { "url": "http://127.0.0.1:8001/", "proxy": "-", "actions": [ {"type": "fill", "selector": "#username", "value": "webrobo"}, {"type": "fill", "selector": "#password", "value": "31337"}, {"type": "click", "selector": "body > form:nth-child(1) > button:nth-child(7)"}, {"type": "wait_for", "selector": ".user", "timeout": 30} ] } ### POST http://127.0.0.1:8000/v1/solve Accept: application/json Content-Type: application/json X-API-Key: {{api_key}} Cookie: session_id=2f2100be-6ce7-40d5-bae5-61424b2504c8; Path=/; SameSite=lax { "url": "http://127.0.0.1:8001/", "proxy": "-", "actions": [ {"type": "mouse_move", "selector": ".logout"}, {"type": "delay", "value": "3"}, {"type": "click", "selector": ".logout"}, {"type": "wait_for", "selector": "#username", "timeout": 10} ] } ### POST http://127.0.0.1:8000/v1/solve Accept: application/json Content-Type: application/json X-API-Key: {{api_key}} { "url": "http://127.0.0.1:8001/", "proxy": "-", "actions": [ {"type": "mouse_move", "selector": ".menu-trigger"}, {"type": "delay", "value": "2"}, {"type": "click", "selector": "div.menu-item:nth-child(3)"}, {"type": "mouse_move", "selector": ".logout"}, {"type": "delay", "value": "10"} ] } ### 2f2100be-6ce7-40d5-bae5-61424b2504c8 POST http://localhost:8002/v2/tasks Accept: application/json Content-Type: application/json X-API-Key: {{api_key}} { "url": "https://freelancehunt.com/", "proxy": "{{proxy}}", "actions": [ { "type": "inner_text", "selector": "//section[@class='hero']//div[@class='hero__content']/h2/span[2]" } ], "captcha_type": "cloudflare", "browser_idle_timeout": 0 } ### GET http://localhost:8002/v2/tasks/4d8105f8-93a8-43ee-aa6e-db917451363b Accept: application/json Content-Type: application/json 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": "inner_text", "selector": "//div[@id='main']/div/h2" } ], "captcha": "{{captcha_key}}", "captcha_type": "recaptcha", "captcha_success_locator": "//div[@id='main']" } ### POST https://app.robotex.sokolab.xyz/v2/tasks 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": "inner_text", "selector": "//div[@id='main']/div/h2" } ], "captcha": "{{captcha_key}}", "captcha_type": "recaptcha", "captcha_success_locator": "//div[@id='main']" } ### GET https://app.robotex.sokolab.xyz/v2/tasks/f75d4a97-afad-4caf-b8eb-595a3f26f6f0 Accept: application/json Content-Type: application/json X-API-Key: {{api_key}} ###