puppeteer-extra-plugin-capsolver
v2.0.1
Published
Manage to solve captcha challenges with AI in a puppeteer-extra app (captcha service based).
Downloads
4,255
Maintainers
Readme
capsolver puppeteer-extra plugin
- Manage to solve captcha challenges with AI in a puppeteer-extra app (captcha service based).
- ❗ An API key it's required. Get here.
⬇️ Install
npm i puppeteer puppeteer-extra puppeteer-extra-plugin-capsolver
✋ Usage
❗ 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.
📁 Working examples
Figure out here.
🔨 Methods
- Figure out all the supported captcha tasks in capsolver-npm#-native-methods.
Disclaimer
- 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.