CAPTCHAFORUM
Administrator
Client for sites rucaptcha.com and 2captcha.com. Easy to use because it is completely promise based.
Installation
Code:
npm install rucaptcha-client
Usage example
Code:
import Rucaptcha from 'rucaptcha-client';
async () => {
const rucaptcha = new Rucaptcha('YOUR_APIKEY');
// If you want to use 2captcha as endpoint
// By default, rucaptcha.com will be used
rucaptcha.baseUrl = 'https://2captcha.com';
// If the API key was specified incorrectly, it will throw RucaptchaError with the code
// ERROR_KEY_DOES_NOT_EXIST. It is useful to call this method immediately after
// initialize to make sure the API key is correct.
const balance = await rucaptcha.getBalance();
const imageUrl =
'https://raw.githubusercontent.com/ivan-podgornov/rucaptcha-client/master/src/rucaptcha/images/captcha.jpg';
const answer = await rucaptcha.solve(imageUrl);
console.log(answer.text); // -> if employees have solved the captcha correctly
};
Documentation https://npm.io/package/rucaptcha-client