sdfdf
This commit is contained in:
@@ -41,13 +41,16 @@ class SeleniumBrowser {
|
||||
let uri = params.uri
|
||||
logger.info('URL %s', uri)
|
||||
if (uri.indexOf('://') > 3) {
|
||||
return this.pool.acquire().then(async driver => {
|
||||
// return this.pool.acquire()
|
||||
return this.getDriver()
|
||||
.then(async driver => {
|
||||
let html = await driver.get(uri)
|
||||
.then(() => driver.findElement(By.css('body')))
|
||||
.then(body => body.getAttribute('innerHTML'))
|
||||
let htmlPromise = this.isCaptchaPage(html) ? this.resolveCaptcha(driver) : this.getHtml(driver, html, params)
|
||||
html = await htmlPromise
|
||||
this.pool.release(driver)
|
||||
// this.pool.release(driver)
|
||||
driver.quit()
|
||||
return html
|
||||
})
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user