Relaunch browser automatically

main
Elbert Alias 4 years ago
parent c89dec1e22
commit 7bb4d66705

@ -173,7 +173,11 @@ class Driver {
class Site { class Site {
constructor(url, headers = {}, driver) { constructor(url, headers = {}, driver) {
;({ options: this.options, browser: this.browser } = driver) ;({
options: this.options,
browser: this.browser,
init: this.initDriver,
} = driver)
this.options.headers = { this.options.headers = {
...this.options.headers, ...this.options.headers,
@ -263,7 +267,7 @@ class Site {
} }
if (!this.browser) { if (!this.browser) {
await this.init() await this.initDriver()
if (!this.browser) { if (!this.browser) {
throw new Error('Browser closed') throw new Error('Browser closed')

@ -13,7 +13,7 @@
"software" "software"
], ],
"homepage": "https://www.wappalyzer.com/", "homepage": "https://www.wappalyzer.com/",
"version": "6.3.7", "version": "6.3.8",
"author": "Wappalyzer", "author": "Wappalyzer",
"license": "MIT", "license": "MIT",
"repository": { "repository": {

@ -13,7 +13,7 @@
"software" "software"
], ],
"homepage": "https://www.wappalyzer.com/", "homepage": "https://www.wappalyzer.com/",
"version": "6.3.7", "version": "6.3.8",
"author": "Wappalyzer", "author": "Wappalyzer",
"license": "MIT", "license": "MIT",
"repository": { "repository": {