Cutcaptcha绕过API服务
代码示例
方法: createTask
API端点:https://api.2captcha.com/createTask
CutCaptchaTaskProxyless
{ "clientKey": "YOUR_API_KEY", "task": { "type": "CutCaptchaTaskProxyless", "miseryKey": "a1488b66da00bf332a1488993a5443c79047e752", "apiKey": "SAb83IIB", "websiteURL": "https://example.cc/foo/bar.html" } }
CutCaptchaTask
{ "clientKey": "YOUR_API_KEY", "task": { "type": "CutCaptchaTask", "miseryKey": "a1488b66da00bf332a1488993a5443c79047e752", "apiKey": "SAb83IIB", "websiteURL": "https://example.cc/foo/bar.html", "proxyType": "http", "proxyAddress": "1.2.3.4", "proxyPort": "8080", "proxyLogin": "user23", "proxyPassword": "p4$w0rd" } }
回應範例
{ "errorId": 0, "status": "ready", "solution": { "token": "BazM23cpFUUyAAAdqPwNEDZx0REtH3ss" }, "cost": "0.00299", "ip": "1.2.3.4", "createTime": 1692863536, "endTime": 1692863556, "solveCount": 1 }
使用令牌
例如,使用返回的标记作为 "input "的值,"id = cap_token",然后提交它的父表单:
document.querySelector('input#cap_token').value='BazM23cpFUUyAAAdqPwNEDZx0REtH3ss' document.querySelector('form').submit()
如果定义了回调函数,可以将标记作为参数调用该函数:
capResponseCallback('BazM23cpFUUyAAAdqPwNEDZx0REtH3ss')