Socket
Socket
Sign inDemoInstall

anti-captcha

Package Overview
Dependencies
47
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    anti-captcha

Captcha recognition services API wrapper.


Version published
Weekly downloads
6
increased by20%
Maintainers
1
Install size
3.69 MB
Created
Weekly downloads
 

Readme

Source

anti-captcha

Installation

npm install anti-captcha

Usage

var anticaptcha = require('anti-captcha');

var service = anticaptcha('http://anti-captcha.com', 'API_KEY');

function printCaptchaText(captcha) {
  console.log(captcha.text);
}

function captchaNotRecognized(captcha) {
   // do something for test then return actual state
   return true; // stub
}

function printReportBad(captcha) {
  console.log('Report recorded');
}

service.downloadImage('https://i.imgur.com/lGQdxBy.png').then(function(base64) {
  service.uploadCaptcha(base64, {phrase: true})
  .then(function(captcha) {
    service.getText(captcha).then(function(captcha) {
      printCaptchaText(captcha);
      if (captchaNotRecognized(captcha)) {
        service.reportBad(captcha).then(printReportBad);
      }
    });
  });
}).catch(function(error) {
    console.log('Error:', error);
});

Keywords

FAQs

Last updated on 27 Nov 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc