feat: custom solve captcha function
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
'use strict';
|
||||
module.exports = class CaptchaSolver {
|
||||
constructor(service, key) {
|
||||
this.service = '';
|
||||
constructor(service, key, defaultCaptchaSolver) {
|
||||
this.service = 'custom';
|
||||
this.solver = undefined;
|
||||
this.defaultCaptchaSolver = defaultCaptchaSolver;
|
||||
this._setup(service, key);
|
||||
}
|
||||
_missingModule(name) {
|
||||
@@ -37,6 +38,9 @@ module.exports = class CaptchaSolver {
|
||||
throw this._missingModule('2captcha');
|
||||
}
|
||||
}
|
||||
default: {
|
||||
this.solve = this.defaultCaptchaSolver;
|
||||
}
|
||||
}
|
||||
}
|
||||
solve() {}
|
||||
|
||||
Reference in New Issue
Block a user