Imperva: reese84 の解決
Cookie の取得
タスクオブジェクトの構造
| パラメータ | タイプ | 必須 | ノート |
|---|---|---|---|
| type | String | Yes | AntiImpervaTask,AntiImpervaTaskProxyLess |
| websiteUrl | String | Yes | ウェブサイトの URL |
| userAgent | String | Yes | ブラウザの User-Agent |
| proxy | String | Yes | あなた自身のプロキシを提供する必要があります |
| utmvc | Boolean | Optional | クッキーに incap_see_xxx, nlbi_xxx, visid_inap_xxx が含まれている場合は true |
| reese84 | Boolean | Optional | クッキーに reese84 が含まれている場合は true |
| reeseScriptUrl | String | Optional | 通常、ダッシュ (-) とランダムな単語がいくつか含まれる URL |
| cookies | List | Optional | カスタムのクッキーを送信できます |
| reeseToken | String | Optional | 既存の reeseToken が期限切れの場合、新しい reeseToken を取得するために現在の reeseToken を送信できます。 |
リクエストの例
POST https://api.capsolver.com/createTask
Host: api.capsolver.com
Content-Type: application/json{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "AntiImpervaTask",
"websiteUrl": "https://example.com/",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36",
"proxy": "http:ip:port:user:pass",
"utmvc": true, // オプション
"reese84": true,
"reeseScriptUrl": "https://example.com/mbit-And-Dirers-him",
"cookies": [
{
"name": "cookieName",
"value": "cookieValue"
}
]
}
}レスポンスの例
{
"errorId": 0,
"status": "idle",
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}結果の取得
認識結果を取得するには getTaskResult メソッドを使用します。
システムの負荷に応じて、結果は 1秒 から 20秒 の間で取得できます。
リクエストの例
POST https://api.capsolver.com/getTaskResult
Host: api.capsolver.com
Content-Type: application/json{
"clientKey": "YOUR_API_KEY",
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}レスポンスの例
{
"errorId": 0,
"errorCode": null,
"errorDescription": null,
"solution": {
"token": "xxxx"
},
"status": "ready"
}