This commit is contained in:
brow3c
2021-05-18 00:36:12 +09:00
parent f88b4e06bf
commit 8b1aa8d906

View File

@@ -21,7 +21,7 @@ class SeleniumBrowser {
if (uri.indexOf('://') > 3) { if (uri.indexOf('://') > 3) {
return poolingService.acquire() return poolingService.acquire()
.then(async driver => { .then(async driver => {
let html = await driver.get(uri).catch(() => driver.get(uri)) let html = await driver.get(uri).catch(() => poolingService.acquire().then(driver => driver.get(uri)))
.then(() => driver.findElement(By.css('body'))) .then(() => driver.findElement(By.css('body')))
.then(body => body.getAttribute('innerHTML')) .then(body => body.getAttribute('innerHTML'))
.catch(e => { .catch(e => {