138 lines
3.2 KiB
HTTP
138 lines
3.2 KiB
HTTP
# Test your FastAPI endpoints
|
|
|
|
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: <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: <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: <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: <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: <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: <key>
|
|
|
|
{
|
|
"url": "https://freelancehunt.com/",
|
|
"proxy": "http://BQLo3X:poqAWX@168.81.43.154:8000",
|
|
"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: <key>
|
|
|
|
###
|