CyberSiAra: 解决 CyberSiAra
⚠️ 通过 createTask 创建任务, 然后通过 getTaskResult 获取识别结果
任务类型type
如下:
AntiCyberSiAraTask
需要转入你自己的代理AntiCyberSiAraTaskProxyLess
无需代理或已内置代理
创建任务
通过 createTask 创建任务
参数结构
Properties | Type | Required | Description |
---|---|---|---|
type | String | Required | AntiCyberSiAraTask AntiCyberSiAraTaskProxyLess |
websiteURL | String | Required | 当前网站的主页url地址 |
SlideMasterUrlId | String | Required | 可以从 api/CyberSiara/GetCyberSiara 网络请求中找到 MasterUrlId |
UserAgent | String | Required | 浏览器请求头 |
proxy | String | Optional | 学习 Using proxies |
请求示例
json
POST https://api.capsolver.com/createTask
Host: api.capsolver.com
Content-Type: application/json
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "AntiCyberSiAraTaskProxyLess", //Required
"websiteURL": "https://exapmle.com/registration", //Required
"SlideMasterUrlId":"zHRugggff3Ll86L9k2yQTJfSYwUnmLc7", // Required
"UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.67", //Required
"proxy": "http:ip:port:user:pass" // socks5:ip:port:user:pass // Optional
}
}
响应示例
json
{
"errorId": 0,
"errorCode": "",
"errorDescription": "",
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}
获取结果
使用 getTaskResult 方法获取识别结果
根据系统负载,您将在 1s
到 10s
的时间间隔内得到结果
请求示例
json
POST https://api.capsolver.com/getTaskResult
Host: api.capsolver.com
Content-Type: application/json
{
"clientKey": "YOUR_API_KEY",
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}
响应示例
json
{
"errorId": 0,
"taskId": "646825ef-9547-4a29-9a05-50a6265f9d8a",
"status": "ready",
"solution": {
"token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6ImNhbXBhaWduLnJ0bS5jb20iLCJuYmYiOjE2ODkxNTUwOTksImV4cCI6MTY4OTE1NTEyOSwiaWF0IjoxNjg5MTU1MDk5LCJpc3MiOiJmcTRLSmNLMlNXZnlYYkhDWHdaME56ZmJ5SUxld2JndSJ9.Pf6zJIynf2lyzpDgfvRGzWlutTMNILZqM-b-ccjNVMgvnjro_-ohokCr_g21iG22td_u5YZJSHrwjg-EM7KVLQ$NzEyMDI5OA=="
}
}
使用 SDK 请求
python
# pip install --upgrade capsolver
# export CAPSOLVER_API_KEY='...'
import capsolver
# capsolver.api_key = "..."
solution = capsolver.solve({
"type": "AntiCyberSiAraTaskProxyLess",
"websiteURL": "https://example.com/registration",
"SlideMasterUrlId": "zHRugggff3Ll86L9k2yQTJfSYwUnmLc7",
"UserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.67",
})
go
package main
import (
"fmt"
capsolver_go "github.com/capsolver/capsolver-go"
"log"
)
func main() {
// first you need to install sdk
//go get github.com/capsolver/capsolver-go
//export CAPSOLVER_API_KEY='...' or
//capSolver := CapSolver{ApiKey:"..."}
capSolver := capsolver_go.CapSolver{}
solution, err := capSolver.Solve(map[string]any{
"type": "AntiCyberSiAraTaskProxyLess",
"websiteURL": "https://example.com/registration",
"SlideMasterUrlId": "zHRugggff3Ll86L9k2yQTJfSYwUnmLc7",
"UserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.67",
})
if err != nil {
log.Fatal(err)
return
}
fmt.Println(solution)
}
``