npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

capsolver-npm

v2.0.2

Published

Manage to solve captcha challenges with AI in a NodeJS app (captcha service based).

Downloads

25,605

Readme

capsolver.com api wrapper🧠

🔥 Promise based 🔥 Catch TaskException with error code and description

⬇️ Install

npm i capsolver-npm

✋ Usage

❗ You need to debug each website and the captcha use case, in order to adjust the correct implementation parameters.

  • Initialize Solver :
const { Solver } = require("capsolver-npm");
const solver = new Solver("CAP-XXXXXX ...");  // one solver by apikey
  • Handle any api.capsolver.com supported task.

📚 Docs

Request a custom tasks (in case this lib doesn't support it yet):

  • It's possible to specify the task type within the JSON object and add the rest of parameters using .runCustomTaskType({}).
  • mustPoll indicates if this task requires to poll the solution after create the task.
  • When using proxy-required tasks, add your proxy connection matching the following:
    • { proxy: "ip:port:user:pass", ... parameters }
const { Solver } = require("capsolver-npm");

const solver = new Solver("CAP-XXXXXX ...");
await solver.runCustomTaskType({ 
    task: {
        type: "AkamaiTask", // suppose this task exists at docs.capsolver.com
        proxy: "ip:port:user:pass" // custom proxy usage
        ... parameters
    }
    mustPoll: true
    })
    .then(solution => { console.log(solution) })
    .catch(e => { console.error(e) });
  • Check the balance with .balance().
if(await solver.balance() < 5.00){
    console.log("Your CapSolver balance is under 5 USD")
}

📁 Working examples

Figure out here.

🔨 Native methods

  • Parameters that have a null by default are optional sometimes, it depends on implementation.
  • Read the "Solving ..." docs.

Solving recaptchav2

await solver.recaptchav2({ websiteURL, websiteKey, proxy, pageAction: null, enterprisePayload: null, isInvisible: false, apiDomain: null, userAgent: null, cookie: null });
await solver.recaptchav2proxyless({ websiteURL, websiteKey, pageAction: null, enterprisePayload: null, isInvisible: false, apiDomain: null, userAgent: null, cookie: null });
await solver.recaptchav2enterprise({ websiteURL, websiteKey, proxy, pageAction: null, enterprisePayload: null, isInvisible: false, apiDomain: null, userAgent: null, cookie: null });
await solver.recaptchav2enterpriseproxyless({ websiteURL, websiteKey, pageAction: null, enterprisePayload: null, isInvisible: false, apiDomain: null, userAgent: null, cookie: null });

Solving recaptchav3

await solver.recaptchav3({ websiteURL, websiteKey, proxy, pageAction, enterprisePayload: null, apiDomain: null, userAgent: null, cookies: null });
await solver.recaptchav3proxyless({ websiteURL, websiteKey, pageAction, enterprisePayload: null, apiDomain: null, userAgent: null, cookies: null });
await solver.recaptchav3enterprise({ websiteURL, websiteKey, proxy, pageAction, enterprisePayload: null, apiDomain: null, userAgent: null, cookies: null });
await solver.recaptchav3enterpriseproxyless({ websiteURL, websiteKey, pageAction, enterprisePayload: null, apiDomain: null, userAgent: null, cookies: null });

Solving hcaptcha

await solver.hcaptcha({ websiteURL, websiteKey, proxy, isInvisible: null, enterprisePayload: null, userAgent: null })
await solver.hcaptchaproxyless({ websiteURL, websiteKey, isInvisible: null, enterprisePayload: null, userAgent: null })

// under manteniance at 27-07-2024
await solver.hcaptchaclassification({ websiteURL: null, websiteKey: null, queries, question })

Solving funcaptcha

await solver.funcaptcha({ websiteURL, websitePublicKey, data: null, userAgent: null, proxy });
await solver.funcaptchaproxyless({ websiteURL, websitePublicKey, data: null, userAgent: null })
await solver.funcaptchaclassification({ websiteURL: null, websiteKey: null, images, module: null, question });

Solving geetest V3 & V4

await solver.geetest({ websiteURL, gt: null, challenge: null, proxy, geetestApiServerSubdomain: null, captchaId: null });
await solver.geetest_proxyless({ websiteURL, gt: null, challenge: null, captchaId: null, geetestApiServerSubdomain: null });

Solving datadome

await solver.datadome({ websiteURL, userAgent, captchaUrl, proxy });

Solving turnstile

// under manteniance at 27-07-2024
await solver.antiturnstile({ websiteURL, websiteKey, metadata: null });

Solving mtcaptcha

await.solver.mtcatpcha({ websiteURL, websiteKey, proxy });

Solving image2text captcha

await solver.image2text({ websiteURL: null, body, module: null, score: null, caseSensitive: null });
  • ❌ Unsupported:
    • AwsWaf (token)
    • AwsWafClassification
    • ReCaptchaClassification
    • VisionEngine