Rucaptcha client for Node js

CAPTCHAFORUM

Administrator
1654773086839.png

Rucaptcha client for small/big captcha with Promises and async/await support

Installation

rucaptcha-solver requires Node v7.0.0 or greater
----
npm i rucaptcha-solver

How to use
Code:
// require solver module
const Solver = require('rucaptcha-solver');

// create new Solver instance
const solver = new Solver({
  apiKey: '1abc234de56fab7c89012d34e56fa7b8' // Required
});

// async/await example. For example with promises check "Examples" link above
(async () => {

  // wikipedia link to captcha
  const captchaUrl = 'https://upload.wikimedia.org/wikipedia/commons/6/69/Captcha.jpg';

  // solve captcha
  const { id, answer } = await solver.solve(captchaUrl);

  console.log(`Your captcha answer is ${answer}`);
  console.log(`Your captcha id is ${id}`);

})();

Constructor
new Solver(settings)

Constructor settings
  • apiKey <String> required - Api key from your rucaptcha.com account. Should be length of 32 symbols.
  • retryInterval <Number> optional - retry interval for making request to get captcha in milliseconds. Default value is 3000 ms. Number shouldn't be less then 2000 ms, because you have a chance to get banned by rucaptcha server.
Available methods
solver.solve(imgPath, options) - solves captcha image. Image gets downloaded from imgPath.
  • imgPath <String> required - Path to captcha image. Can be url or local path
  • params <Object> optional - Additional params with POST request to help solve captcha more easily. All available parameters can be found here
  • returns <Promise> which resolves to <Object> with id and answer
Documentation https://github.com/bogdan0083/rucaptcha-solver