async-captcha
Automate the process of captcha solving for various services.
Current list of supported services:
[✔]anti-captcha
Installation
npm i async-captcha
Usage
Include the module in your code:
const captcha = ; // Parameters: (API_KEY:String, IntervalSeconds:Number, MaxRetry:Number) const anticaptcha = "YOUR_API_KEY" 2 10;
Async/await
anticaptcha.getResult
// Your image as base64 stringconst base64Image = "iVBORw0KGgoAAAANSUhEUg......lFTkSuQmCC="; let res = await anticaptcha; // res contains the solved captcha valueconsole;// "pKwtH5"
Promises
Same as async/await, but using promises.
anticaptcha.getResult
anticaptcha ;
Custom Properties
You can pass additional properties as 2nd parameter of .getResult() method in form of object. If you don't pass any parameters it'll use default values instead
Here are available parameters:
Property | Type | Default |
---|---|---|
phrase | Boolean | false |
case | Boolean | false |
numeric | Integer | 0 |
math | Boolean | false |
minLength | Integer | 0 |
maxLength | Integer | 0 |
^ Detailed descriptions can be found here.
// Your image as base64 stringconst base64Image = "iVBORw0KGgoAAAANSUhEUg......lFTkSuQmCC="; const options = case: true minLength: 5 maxLength: 5; let res = await anticaptcha; // res contains the solved captcha valueconsole;// "pKwtH5"