captcha-service

Lib support to solve 2D captcha with 2captcha, anticaptcha, deathcaptcha, azcaptcha and ...

Usage no npm install needed!

<script type="module">
  import captchaService from 'https://cdn.skypack.dev/captcha-service';
</script>

README

Captcha Service

Supported captcha services

Installation

Via npm:

npm i -S captcha-service

Update via npm:

npm update captcha-service

Usage

const CaptchaService = require('captcha-service');

const solver = new CaptchaService({
  captcha_service: "twocaptcha",
  captcha_key: "captcha_key",
  imageCaptchaPath: "./img.png",
  renameImage: false
});

solver.Stream.on('log', data => console.log('log:', data));

solver.solveCaptcha().then(text => {

  console.log("Result:", text);

  // log: Solving captcha trytime=1
  // log: Solve captcha with captcha_index: 0
  // log: TwoCaptcha: {"_id":"67389604474","_apiResponse":"OK|vbwzye","_text":"vbwzye"}
  // log: Captcha result: vbwzye | img.png
  // Result: vbwzye

}).catch(err => console.log(err));

API

CaptchaService([options])