sdfdsf
This commit is contained in:
@@ -85,17 +85,17 @@ class SeleniumBrowser {
|
||||
res = await this.requestCaptchaResult(res, requestId)
|
||||
if (maxRetry == 0) break
|
||||
} while (res.request == 'CAPCHA_NOT_READY')
|
||||
this.isRecaptchaReseponseEmpty = false
|
||||
this.pool.release(driver)
|
||||
this.isRecaptchaReseponseEmpty = false
|
||||
return res
|
||||
}).then(res => {
|
||||
logger.debug(res, '2captcha solved')
|
||||
driver.executeScript('captchaCallback("' + res.request + '")')
|
||||
driver.wait(10000).then(d => {
|
||||
driver.findElement(By.css('#g-recaptcha-response')).then(function (webElement) {
|
||||
logger.error(res, 'Failed to overcome recaptcha')
|
||||
}, function (err) {
|
||||
logger.info('Success to overcome recaptcha')
|
||||
driver.findElement(By.css('#g-recaptcha-response'))
|
||||
.then(() => {
|
||||
throw new Error('Still captcha page')
|
||||
}).catch(err => {
|
||||
logger.error({message: err.message}, 'Since 2captcha solved')
|
||||
this.pool.release(driver)
|
||||
})
|
||||
})
|
||||
}).catch(error => {
|
||||
|
||||
Reference in New Issue
Block a user