RecaptchaV3TaskProxyless:破解 Google Recaptcha v3 谜题
必须使用这种任务对象,才能通过工作人员的电脑破解 Google Recaptcha V3 谜题。会用我们自己的代理服务器和/或工作人员的 IP 地址通过我们的服务执行这种任务。
请注意,不可见的 Recaptcha V2 谜题与 Recaptcha V3 谜题并不相同。二者看似相同,可能会令人感到困惑。有一个快速方法可以确定正确的类型:尝试通过我们的 API 将其作为可见 V2 和 V3 谜题破解。其中的一次尝试会遇到错误,另一次尝试则不会遇到错误。
我们对工作人员进行测验,以获取其 Recaptcha“得分”,然后将其分为 3 组(队列):0.3、0.7 和 0.9。每一组的价格都可能会因为空闲工作人员数量而略有不同。通过传递属性 minScore,可指定任务将会进入的队列。我们大多数空闲工作人员的得分都是 0.3,得分为 0.9 的工作人员最少。
可在此常见问题解答部分中找到更多 Recaptcha V3 相关信息。

Recaptcha v3 谜题示例。页面右下角中通常有一个徽标。但轻易就能通过 Javascript 将其移除。
任务对象
属性 | 类型 | 必须使用 | 用途 |
---|---|---|---|
type | 字符串 | 是 | RecaptchaV3TaskProxyless |
websiteURL | 字符串 | 是 | 目标网页的地址。可位于网站中的任何位置,甚至可位于会员区中。我们的工作人员不会转到该位置,而是会模拟其访问操作。 |
websiteKey | 字符串 | 是 | Recaptcha 网站密钥。请在此文章中了解如何查找网站密钥。 |
minScore | 双精度值 | 是 | 通过所需得到的分数筛选工作人员。分值可以是以下某个分值: 0.3 0.7 0.9 |
pageAction | 字符串 | 否 | Recaptcha 谜题的“action”值。网站所有者通过此参数指定用户在页面中执行的操作。 示例: grecaptcha.execute('site_key', {action:'login_test'}) |
isEnterprise | 布尔值 | 否 | 如果必须通过 Enterprise API 破解这种 V3 谜题,则将此标志设置为“true”。默认值是“false”,并且会通过非企业 API 破解 Recaptcha 谜题。可通过下例中这样的 Javascript 调用进行判断。
grecaptcha.enterprise.execute('site_key', {..}) |
apiDomain | 字符串 | 否 | 使用这个参数来发送域名,Recaptcha脚本应该从这个域名提供。只能有两个值中的一个。"www.google.com" 或 "www.recaptcha.net"。除非你明白你在做什么,否则不要使用这个参数。 |
请求示例
CURL
curl -i -H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST -d '{
"clientKey":"YOUR_API_KEY_HERE",
"task":
{
"type":"RecaptchaV3TaskProxyless",
"websiteURL":"http://mywebsite.com/recaptcha/test.php",
"websiteKey":"6Lc_aCMTAAAAABx7u2N0D1XnVbI_v6ZdbM6rYf16",
"minScore": 0.3,
"pageAction": "myverify",
"isEnterprise": false
},
"softId": 0
}' https://api.anti-captcha.com/createTask
PHP
<?php
//git clone git@github.com:AdminAnticaptcha/anticaptcha-php.git
include("anticaptcha.php");
include("recaptchaV3.php");
$api = new RecaptchaV3();
$api->setVerboseMode(true);
//your anti-captcha.com account key
$api->setKey("YOUR_API_KEY_HERE");
//target website address
$api->setWebsiteURL("http://makeawebsitehub.com/recaptcha/test.php");
//recaptcha key from target website
$api->setWebsiteKey("6LfI9IsUAAAAAKuvopU0hfY8pWADfR_mogXokIIZ");
//parameters for V3
//score you would like to have
$api->setMinScore(0.9);
//optional page action
$api->setPageAction("some_action");
//Specify softId to earn 10% commission with your app.
//Get your softId here: https://anti-captcha.com/clients/tools/devcenter
$api->setSoftId(0);
//create task in API
if (!$api->createTask()) {
$api->debout("API v2 send failed - ".$api->getErrorMessage(), "red");
return false;
}
$taskId = $api->getTaskId();
//wait in a loop for max 300 seconds till task is solved
if (!$api->waitForResult(300)) {
echo "could not solve captcha\n";
echo $api->getErrorMessage()."\n";
} else {
$gResponse = $api->getTaskSolution();
echo "\n";
echo "your recaptcha token: $gResponse\n\n";
//check result, then:
$api->reportCorrectRecaptcha();
//or
//$api->reportIncorrectRecaptcha();
}
Python
#pip3 install anticaptchaofficial
from anticaptchaofficial.recaptchav3proxyless import *
solver = recaptchaV3Proxyless()
solver.set_verbose(1)
solver.set_key("YOUR_API_KEY_HERE")
solver.set_website_url("https://website.com")
solver.set_website_key("SITE_KEY")
solver.set_page_action("home_page")
solver.set_min_score(0.9)
# Specify softId to earn 10% commission with your app.
# Get your softId here: https://anti-captcha.com/clients/tools/devcenter
solver.set_soft_id(0)
g_response = solver.solve_and_return_solution()
if g_response != 0:
print "g-response: "+g_response
else:
print "task finished with error "+solver.error_code
NodeJS
//npm install @antiadmin/anticaptchaofficial
//https://github.com/AdminAnticaptcha/anticaptcha-npm
const ac = require("@antiadmin/anticaptchaofficial");
ac.setAPIKey('YOUR_API_KEY_HERE');
//Specify softId to earn 10% commission with your app.
//Get your softId here: https://anti-captcha.com/clients/tools/devcenter
ac.setSoftId(0);
ac.solveRecaptchaV3('http://DOMAIN.COM',
'WEBSITE_KEY',
0.3, //minimum score required: 0.3, 0.7 or 0.9
'PAGE_ACTION_CAN_BE_EMPTY')
.then(gresponse => {
console.log('g-response: '+gresponse);
})
.catch(error => console.log('test received error '+error));
C#
//git clone git@github.com:AdminAnticaptcha/anticaptcha-csharp
using System;
using Anticaptcha_example.Api;
using Anticaptcha_example.Helper;
using Newtonsoft.Json.Linq;
namespace Anticaptcha_example
{
internal class Program
{
private static void Main() {
DebugHelper.VerboseMode = true;
var api = new RecaptchaV3Proxyless
{
ClientKey = "YOUR_API_KEY_HERE",
WebsiteUrl = new Uri("http://makeawebsitehub.com/recaptcha/test.php"),
WebsiteKey = "6LfI9IsUAAAAAKuvopU0hfY8pWADfR_mogXokIIZ",
PageAction = "login_or_register",
IsEnterprise = false,
// Specify softId to earn 10% commission with your app.
// Get your softId here:
// https://anti-captcha.com/clients/tools/devcenter
SoftId = 0
};
api.MinScore(0.3)
if (!api.CreateTask())
DebugHelper.Out("API v2 send failed. " + api.ErrorMessage, DebugHelper.Type.Error);
else if (!api.WaitForResult())
DebugHelper.Out("Could not solve the captcha.", DebugHelper.Type.Error);
else
DebugHelper.Out("Result: " + api.GetTaskSolution().GRecaptchaResponse, DebugHelper.Type.Success);
}
}
}
Java
//git clone git@github.com:AdminAnticaptcha/anticaptcha-java.git
DebugHelper.setVerboseMode(true);
RecaptchaV3Proxyless api = new RecaptchaV3Proxyless();
api.setClientKey("YOUR_API_KEY_HERE");
api.setWebsiteUrl(new URL("http://getcaptchajob.com/"));
api.setWebsiteKey("6LfE4ZIUAAAAAGSYvvoszRvEC9IgFVyXwGkypn-W");
api.setPageAction("testPageAction");
api.setMinScore(0.9);
//Specify softId to earn 10% commission with your app.
//Get your softId here: https://anti-captcha.com/clients/tools/devcenter
api.setSoftId(0);
if (!api.createTask()) {
DebugHelper.out(
"API v2 send failed. " + api.getErrorMessage(),
DebugHelper.Type.ERROR
);
} else if (!api.waitForResult()) {
DebugHelper.out("Could not solve the captcha.", DebugHelper.Type.ERROR);
} else {
DebugHelper.out("Result: " + api.getTaskSolution().getGRecaptchaResponse(), DebugHelper.Type.SUCCESS);
}
回应示例
JSON 没有错误
{
"errorId": 0,
"taskId": 7654321
}
JSON 有错误
{
"errorId": 1,
"errorCode": "ERROR_KEY_DOES_NOT_EXIST",
"errorDescription": "Account authorization key not found in the system"
}
重获破解结果
用方法 getTaskResult 请求提供破解结果。首次提出请求之前,要给工作人员一些时间,例如 5 秒钟。如果工作人员还在忙,则过 3 秒再重试。
任务破解结果对象
属性 | 类型 | 用途 |
---|---|---|
gRecaptchaResponse | 字符串 | 与目标网站中的提交窗体发生相互作用所需的标记字符串。 |
回应示例
JSON 没有错误
{
"errorId":0,
"status":"ready",
"solution":
{
"gRecaptchaResponse":"3AHJ_VuvYIBNBW5yyv0zRYJ75VkOKvhKj9_xGBJKnQimF72rfoq3Iy-DyGHMwLAo6a3"
},
"cost":"0.001500",
"ip":"46.98.54.221",
"createTime":1472205564,
"endTime":1472205570,
"solveCount":"0"
}