New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

puppeteer-extra-plugin-capsolver

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

puppeteer-extra-plugin-capsolver

manage to solve captcha challenges with puppeteer

  • 2.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13K
increased by1.16%
Maintainers
2
Weekly downloads
 
Created
Source

puppeteer-extra-plugin-capsolver

manage to solve captcha challenges with puppeteer

  • ❗ API key it's required Get here

npm version

Install

npm i puppeteer puppeteer-extra puppeteer-extra-plugin-capsolver

Usage

  • Import puppeteer-extra and the plugin package
const puppeteer = require("puppeteer-extra");
const {
  SolverPlugin,
  SolverPluginError,
  SolverError,
} = require("puppeteer-extra-plugin-capsolver");
Auto-load official Browser Extension
  • How it works? This feature would auto-load the extension from a zipped file into static temp folder on your disk, then would load from there on demand refreshing apiKey on load.

  • How to use with from the plugin?

    • Set useExtension on plugin init.
    • Control the extension with await page.waitForSolverCallback({ timeout }).
puppeteer.use(
  new SolverPlugin({
    apiKey: process.env.APIKEY,
    useExtension: true, // this will auto-load the extension and apiKey
    useExtensionProxy: process.env.PROXYSTRING, // force proxy string on solving
    useExtensionReCaptchaMode: "token", // click or token mode
  })
);

// ...

await page.waitForSolverCallback({
  // timeout: 120000,
});
Common usage: call the API
  • How it works? Make use of capsolver-npm package to perform API calls for solution retrieving.

  • How to use with from the plugin?

    • Call to await page.solver().<method>({}) from any Page.
    • See methods and it's usage here.
puppeteer.use(
  new SolverPlugin({
    apiKey: process.env.APIKEY,
  })
);

// ...

await page
  .solver()
  .recaptchav2classification({
    // ... parameters
  })
  .then((s: any) => {
    console.log(s);
  })
  .catch((e: SolverError) => {
    console.log(`Errored task Id: ${e.errorTaskId}`);
    console.log(`Error Code: ${e.errorCode}`);
    console.log(`Error description: ${e.errorDescription}`);
  });

📁 Updated examples

Figure out here.

Disclaimer

By using this package, you acknowledge and agree that:

  • You are solely responsible for how you use the API and the author does not assume any liability for misuse, abuse, or violations of Capsolver’s terms of service.
  • This package provides a service connector for the Capsolver API and is not affiliated.

FAQs

Package last updated on 11 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc