Skip to content

0qwertyy/puppeteer-extra-plugin-capsolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 within puppeteer-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.

Example

🔨 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.