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);
}).catch(err => console.log(err));
API
CaptchaService([options])
options
<Object>
captcha_service
<string> Has support: (require)
- azcaptcha
- twocaptcha
- anticaptcha
- deathbycaptcha
captcha_key
<string|Array<string>> API KEY of captcha service. Example: ["KEY1", "KEY2"]
or just a single key "KEY1"
or ["KEY1"]
imageCaptchaPath
<string|path> Captcha image file address- renameImage <boolean>
Default: false
Whether to rename captcha image file affter solved with the filename as the result of the captcha.
- return
.solveCaptcha()
To solve captcha
- return: <string> Text from image captcha
Author
👤 Văn Tài
Made with ❤️ by Văn Tài