commit
4a79c329bf
|
@ -130,7 +130,7 @@ class Puppeteer {
|
||||||
logger.mark('puppeteer Chromium 已连接启动的实例')
|
logger.mark('puppeteer Chromium 已连接启动的实例')
|
||||||
} else {
|
} else {
|
||||||
console.log('chromium', this.browser.wsEndpoint())
|
console.log('chromium', this.browser.wsEndpoint())
|
||||||
if (this.browserMacKey) {
|
if (process.env.pm_id && this.browserMacKey) {
|
||||||
//缓存一下实例30天
|
//缓存一下实例30天
|
||||||
const expireTime = 60 * 60 * 24 * 30
|
const expireTime = 60 * 60 * 24 * 30
|
||||||
await redis.set(this.browserMacKey, this.browser.wsEndpoint(), { EX: expireTime })
|
await redis.set(this.browserMacKey, this.browser.wsEndpoint(), { EX: expireTime })
|
||||||
|
@ -257,7 +257,7 @@ class Puppeteer {
|
||||||
|
|
||||||
if (!this.browser) return false
|
if (!this.browser) return false
|
||||||
|
|
||||||
const savePath = this.dealTpl(this.model, data)
|
const savePath = this.dealTpl(name, data)
|
||||||
if (!savePath) return false
|
if (!savePath) return false
|
||||||
|
|
||||||
const page = await this.browser.newPage()
|
const page = await this.browser.newPage()
|
||||||
|
|
Loading…
Reference in New Issue