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

2captcha-nodejs

v0.0.3

Published

This is a boilerplate of an Apify actor.

Downloads

8

Readme

Install

cd 2Captcha_Node_Js

npm i 2captcha-nodejs


Usage

const { solveCaptchaV2 } = require('2captcha-nodejs');
//default value
const siteDetails = {
    sitekey: '6LccSjEUAAAAAN-WiRxCZ5CzsjR_123456', // key site Captcha
    pageurl: 'https://captcha-delivery.com', // url destination 
};
const api = {
    in: 'https://2captcha.com/in.php',
    res: 'https://2captcha.com/res.php',
    key: '123456789', // account key at 2captcha.com
    pollingInterval: 5000
};
const params = {
    key: api.key,
    method: 'userrecaptcha',
    googlekey: siteDetails.sitekey,
    pageurl: siteDetails.pageurl,
    json: 1,
    version:'v2', // v3, Enterprise
    header_acao:1,

    // proxy: '[email protected]',
    // proxyType:'HTTP',
    // min_score:0.3, // using with google captcha v3
    // invisible:1, // using with google captcha v2 invisible
    // action:'globalRecaptchaCallback', // callbackk function javascript
};
(async () => {

    // solve the captcha with API
    console.log("* Waiting g-recaptcha-reponse");

    const token = await solveCaptchaV2(params, api);
    console.log('* Receive g-recaptcha-reponse: ' + token);
    
    // unsccessful case 
    if (token.includes('ERROR') || token.includes('CAPCHA_NOT_READY')){
        process.exit(1)
    }
   
  })();

Motivation

These days captchas are unfortunately everywhere, with reCAPTCHA having the biggest "market share" in that space (> 80%). The situation got really bad, with privacy minded users (tracking blocker, VPNs) being penalized heavily and having to solve a lot of reCAPTCHA challenges constantly while browsing the web.

These small codes allow us to get automatically google token from 2Captcha Service and bypass google's protection. It is very important for crawler's activites.