🚑 修改puppeteer.devices引入方式防止低版本报错
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import fs from 'fs'
|
||||
import _ from 'lodash'
|
||||
import { devices } from 'puppeteer'
|
||||
import pet from '../../../../lib/puppeteer/puppeteer.js'
|
||||
import { Config, Data, Plugin_Name, Version } from '../../components/index.js'
|
||||
|
||||
// 适配低版本puppeteer
|
||||
const _puppeteer = await import('puppeteer')
|
||||
let puppeteer = null
|
||||
let StealthPlugin = null
|
||||
try {
|
||||
@@ -29,7 +29,7 @@ export default new (class newPuppeteer {
|
||||
isLandscape: false
|
||||
}
|
||||
},
|
||||
...devices
|
||||
..._puppeteer.devices
|
||||
}
|
||||
this.browser = false
|
||||
this.config = {
|
||||
|
||||
Reference in New Issue
Block a user