This commit is contained in:
spiduler
2020-10-26 10:47:09 +09:00
parent 61b3e4b2bc
commit d1630cbb7c
2 changed files with 2 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ class SeleniumBrowser {
.then(body => body.getAttribute('innerHTML')) .then(body => body.getAttribute('innerHTML'))
let htmlPromise = this.isCaptchaPage(html) ? this.resolveCaptcha(driver) : this.getHtml(driver, html, params) let htmlPromise = this.isCaptchaPage(html) ? this.resolveCaptcha(driver) : this.getHtml(driver, html, params)
html = await htmlPromise html = await htmlPromise
this.pool.destroy(driver) this.pool.release(driver)
return html return html
}) })
} else { } else {

View File

@@ -7,7 +7,7 @@ const logger = require("logops")
class PoolingService { class PoolingService {
constructor() { constructor() {
this.config = { this.config = {
pool: { max: 10, min: 1, testOnBorrow: true }, pool: { max: 20, min: 1, testOnBorrow: true },
browser: 'chrome', browser: 'chrome',
browserArgs: ['--no-sandbox', '--headless', '--disable-dev-shm-usage', '--proxy-server=spiduler-tor:8118'] browserArgs: ['--no-sandbox', '--headless', '--disable-dev-shm-usage', '--proxy-server=spiduler-tor:8118']
} }