Basilisk - FaucetPay 验证码
警告!
此任务将使用我们的代理服务器执行。
请求参数
type
<string>requiredCustomTask
class
<string>requiredBasilisk
websiteURL
<string>required解决验证码的主页地址。
websiteKey
<string>required可以在验证码容器的data-sitekey属性中或在向 https://basiliskcaptcha.com/challenge/check-site
发送的 POST 请求的 site_key字段中找到。
userAgent
<string>optionalUser-Agent 浏览器。仅传递来自 Windows 操作系统的当前 UA。现在是: userAgentPlaceholder
创建任务方法
POST
https://api.capmonster.cloud/createTask
要求
{
"clientKey": "API_KEY",
"task": {
"type": "CustomTask",
"class": "Basilisk",
"websiteURL": "https://domain.io/account/register",
"websiteKey": "b7890hre5cf2544b2759c19fb2600897",
"userAgent": "userAgentPlaceholder"
}
}
回应
{
"errorId":0,
"taskId":407533072
}
获取任务结果方法
使用方法getTaskResult获取Basilisk解决方案。
POST
https://api.capmonster.cloud/getTaskResult
要求
{
"clientKey":"API_KEY",
"taskId": 407533072
}
回应
{
"errorId":0,
"status":"ready",
"solution": {
"data": {
"captcha_response": "5620301f30daf284b829fba66fa9b3d0"
},
"headers": {
"User-Agent": "userAgentPlaceholder"
}
}
}
使用 SDK 库
- JavaScript
- Python
- C#
// https://github.com/ZennoLab/capmonstercloud-client-js
import { CapMonsterCloudClientFactory, ClientOptions, BasiliskRequest } 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 basiliskRequest = new BasiliskRequest({
websiteURL: 'https://example.com',
websiteKey: 'websiteKey',
});
console.log(await cmcClient.Solve(basiliskRequest));
});
# https://github.com/ZennoLab/capmonstercloud-client-python
import asyncio
from capmonstercloudclient import CapMonsterClient, ClientOptions
from capmonstercloudclient.requests import BasiliskCustomTaskProxylessRequest
client_options = ClientOptions(api_key="your_api_key") # Replace with your CapMonster Cloud API key
cap_monster_client = CapMonsterClient(options=client_options)
basilisk_request = BasiliskCustomTaskProxylessRequest(
websiteUrl="https://example.com", # URL with captcha
websiteKey="b3760bfe5cf4254b2759c19fg2698og" # Replace with the correct website key
)
async def solve_captcha():
return await cap_monster_client.solve_captcha(basilisk_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 basiliskRequest = new BasiliskCustomTaskProxylessRequest
{
WebsiteUrl = "https://example.com", // URL with captcha
WebsiteKey = "b3760bfe5cf4254b2759c19fg2698og" // Replace with the correct website key
};
var basiliskResult = await cmCloudClient.SolveAsync(basiliskRequest);
Console.WriteLine("Captcha Solution: " + string.Join(", ", basiliskResult.Solution.Data));
Console.WriteLine("Captcha Solution: " + string.Join(", ", basiliskResult.Solution.Headers));
}
}