- Manage to solve captcha challenges with AI in a puppeteer-extra app (captcha service based).
- ❗ An API key it's required. Get here.
npm i puppeteer puppeteer-extra puppeteer-extra-plugin-capsolver
❗ This plugin only helps retrieving solving tasks from api.capsolver.com based on capsolver-npm
- Initialize
SolverPlugin
and use it withinpuppeteer-extra
. - Then call
await page.solver()
to retrieve and use the solver at any moment.
const puppeteer = require("puppeteer-extra");
const SolverPlugin = require("puppeteer-extra-plugin-capsolver")("CAP-XXXXXX ...");
puppeteer.use(SolverPlugin);
puppeteer.launch().then(async (browser) => {
try {
let page = await browser.newPage();
await page.goto("https://example.com/");
let solution = await page.solver().hcaptchaproxyless({
websiteURL: "https://example.com/",
websiteKey: "00000000-0000-0000-0000-000000000000"
});
// use your solution (solution.gRecaptchaResponse in this case)
// ...
} catch (e) {
console.log(e);
} finally {
await browser.close();
}
});
- Handle any
api.capsolver.com
supported task.
Figure out here.
- Figure out all the supported captcha tasks in capsolver-npm#-native-methods.
- This plugin is intended to provide automatic solutions to the implementation of captcha challenges within a DOM, by each use case.
- There is no specific feature yet.