RecaptchaV3TaskProxyless
RecaptchaV3TaskProxyless
$0.9 / 1000 代币
99%
该对象包含用于解决 Google ReCaptcha3 任务的数据。此任务将通过我们的服务使用我们自己的代理服务器执行。
与 ReCaptcha2 不同,ReCaptcha3 不需要站点访问者执行任何操作,它在页面背景中隐式工作,收集和分析用户数据,以确定其是否为人类或机器人。基于这些分析,网站会得到一个信任评级(从 0.1 到 0.9)。
创建任务时,您还应额外传递两个参数 - pageAction 和 minScore。
请求参数
type
<string>requiredRecaptchaV3TaskProxyless
websiteURL
<string>required带有 Google ReCaptcha 的网页地址。
websiteKey
<string>requiredRecaptcha 网站密钥。
https://www.google.com/recaptcha/api.js?render=THIS_ONE
minScore
<double>optional从 0.1 到 0.9 的值。
pageAction
<string>optional小部件操作值。网站所有者通过此参数定义用户在页面上的活动。默认值: verify
示例:grecaptcha.execute('site_key', {action:'login_test'})
。
创建任务方法
POST
https://api.capmonster.cloud/createTask
要求
{
"clientKey":"API_KEY",
"task": {
"type":"RecaptchaV3TaskProxyless",
"websiteURL":"https://lessons.zennolab.com/captchas/recaptcha/v3.php?level=beta",
"websiteKey":"6Le0xVgUAAAAAIt20XEB4rVhYOODgTl00d8juDob",
"minScore": 0.3,
"pageAction": "myverify"
}
}
回应
{
"errorId":0,
"taskId":407533072
}
获取任务结果方法
使用 getTaskResult 请求获取 ReCaptcha3 的答案。根据服务负载情况,您将在 10 到 30 秒内收到响应。
POST
https://api.capmonster.cloud/getTaskResult
要求
{
"clientKey":"API_KEY",
"taskId": 407533072
}
回应
{
"errorId":0,
"status":"ready",
"solution": {
"gRecaptchaResponse":"3AHJ_VuvYIBNBW5yyv0zRYJ75VkOKvhKj9_xGBJKnQimF72rfoq3Iy-DyGHMwLAo6a3"
}
}
属性 | 类型 | 描述 |
---|---|---|
gRecaptchaResponse | String | 应插入到 Recaptcha3 提交表单中的哈希值 <textarea id="g-recaptcha-response"></textarea> 。长度为 500 到 2190 字节。 |
使用 SDK 库
- JavaScript
- Python
- C#
// https://github.com/ZennoLab/capmonstercloud-client-js
import { CapMonsterCloudClientFactory, ClientOptions, RecaptchaV3ProxylessRequest } from '@zennolab_com/capmonstercloud-client';
document.addEventListener('DOMContentLoaded', async () => {
const cmcClient = CapMonsterCloudClientFactory.Create(new ClientOptions({ clientKey: '<your capmonster.cloud API key>' }));
console.log(await cmcClient.getBalance());
const recaptchaV3Request = new RecaptchaV3ProxylessRequest({
websiteURL: 'https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high',
websiteKey: '6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd',
minScore: 0.6,
pageAction: 'some-action',
});
console.log(await cmcClient.Solve(recaptchaV3Request));
});
更多相关内容,请访问我们的博客
# https://github.com/Zennolab/capmonstercloud-client-python
import asyncio
from capmonstercloudclient import CapMonsterClient, ClientOptions
from capmonstercloudclient.requests import RecaptchaV3ProxylessRequest
client_options = ClientOptions(api_key="your_api_key") # Replace with your CapMonster Cloud API key
cap_monster_client = CapMonsterClient(options=client_options)
recaptcha_v3_request = RecaptchaV3ProxylessRequest(
websiteUrl="https://lessons.zennolab.com/captchas/recaptcha/v3.php?level=beta", # URL with captcha
websiteKey="6Le0xVgUAAAAAIt20XEB4rVhYOODgTl00d8juDob", # Replace with the correct website key
minScore=0.6,
pageAction="myverify"
)
async def solve_captcha():
return await cap_monster_client.solve_captcha(recaptcha_v3_request)
responses = asyncio.run(solve_captcha())
print(responses)
更多相关内容,请访问我们的博客
// https://github.com/ZennoLab/capmonstercloud-client-dotnet
using Zennolab.CapMonsterCloud.Requests;
using Zennolab.CapMonsterCloud;
class Program
{
static async Task Main(string[] args)
{
var clientOptions = new ClientOptions
{
ClientKey = "your_api_key" // Replace with your CapMonster Cloud API key
};
var cmCloudClient = CapMonsterCloudClientFactory.Create(clientOptions);
var recaptchaV3Request = new RecaptchaV3ProxylessRequest
{
WebsiteUrl = "https://lessons.zennolab.com/captchas/recaptcha/v3.php?level=beta", // URL with captcha
WebsiteKey = "6Le0xVgUAAAAAIt20XEB4rVhYOODgTl00d8juDob", // Replace with the correct website key
MinScore = 0.6,
PageAction = "myverify"
};
var recaptchaV3Result = await cmCloudClient.SolveAsync(recaptchaV3Request);
Console.WriteLine("Captcha Solution: " + recaptchaV3Result.Solution.Value);
}
}
更多相关内容,请访问我们的博客