sdfd
This commit is contained in:
@@ -103,15 +103,13 @@ class CaptchaComp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resolveCaptcha(driver) {
|
resolveCaptcha(driver) {
|
||||||
if (this.api.working === false) {
|
return this.api.working ? new Promise(r => r(new Error('Resovling Catpcha'))) : this.requestResolve(driver)
|
||||||
return this.api.working ? new Promise(r => r(new Error('Resovling Catpcha'))) : this.requestResolve(driver)
|
.then(id => this.getAnswer(id))
|
||||||
.then(id => this.getAnswer(id))
|
.then(res => {
|
||||||
.then(res => {
|
setTimeout(() => { this.api.working = false }, 1000 * 5 * 2)
|
||||||
setTimeout(() => { this.api.working = false }, 1000 * 5 * 2)
|
logger.info({ result: res.request }, 'Calling captchaCallback')
|
||||||
logger.info({ result: res.request }, 'Calling captchaCallback')
|
return driver.executeScript('captchaCallback("' + res.request + '")').then(() => this.sleep(1000 * 5))
|
||||||
return driver.executeScript('captchaCallback("' + res.request + '")').then(() => this.sleep(1000 * 5))
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user