Captcha Solver
When using our scraping browser, it is inevitable to encounter risk control CAPTCHAs that need to be solved. These CAPTCHAs may affect your automated tasks. But don't worry, we provide a simpler way t
Custom CDP Functions
If you encounter a risk control CAPTCHA, we need you to notify us using the CDP command, and we will help you solve it once we receive the instruction,You only need to send a CDP command: 'Captchas.automaticSolver' along with the type of CAPTCHA you need to solve, and we will help you solve it.
How to use
const client = await page.createCDPSession();
try {
const res = await client.send('Captchas.automaticSolver',{
"timeout": 120000, // timeout, Please allow sufficient time, and 2 minutes is recommended.
"solverType": "cloudflare" //Captchas type
});
//res = {message: 'solver message', success: true, timestamp: 170000000}
console.log("res=", res)
} catch(e) {
console.error("err=", e)
}
Some examples
const puppeteer = require('puppeteer-core');
const Target_URL = "https://example.com";
const wsUrl = 'wss://PROXY-FULL-ACCOUNT:[email protected]'; //Your credentials
async function run(){
// connect browser
const browser = await puppeteer.connect({
browserWSEndpoint: wsUrl,
});
try{
console.log("Connected to browser...");
// Create a new page
const page = await browser.newPage();
// Go to target site
await page.goto(Target_URL, { waitUntil: "networkidle0" });
// Obtain the CDP client and send a custom CDP protocol
const client = await page.createCDPSession();
try {
const res = await client.send('Captchas.automaticSolver',{
"timeout": 120000, // Please allow sufficient time, and 2 minutes is recommended.
"solverType": "cloudflare" // Use the corresponding type.
});
// {message: 'Solver meaages', success: true, timestamp: 170000000}
console.log("res=", res)
} catch(e) {
console.error("err=", e)
}
// Verification
await page.screenshot({ path: 'solver_cf.png'});
const title = await page.title();
console.log("title=", title);
} catch (error) {
console.error(error);
}
finally{
console.info("browser closed")
await browser.close();
}
}
run();
Attribute conventions
When you send a CDP command, it is required to include solverType
in
cloudflare
google-v2
datadome
No matter which type of CAPTCHA you solve using our Captcha Solver, its return structure is the same.
res= {
message: 'captcha solver success', //Description
success: true, //Sovler status
timestamp: 1755763768 //Timestamp
}
You can determine whether the CAPTCHA challenge is successful based on the success
attribute in the returned data.
Last updated