mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-05 23:47:54 +08:00
add and patch AnonymizeUaPlugin; make version of find-chrome-bin fixed
This commit is contained in:
@@ -74,25 +74,29 @@ export const autoStartChatEventBus = new EventEmitter()
|
||||
let puppeteer
|
||||
let StealthPlugin
|
||||
let LaodengPlugin
|
||||
let AnonymizeUaPlugin
|
||||
export async function initPuppeteer () {
|
||||
// production
|
||||
const importResult = await Promise.all(
|
||||
[
|
||||
import('puppeteer-extra'),
|
||||
import('puppeteer-extra-plugin-stealth'),
|
||||
import('@geekgeekrun/puppeteer-extra-plugin-laodeng')
|
||||
import('@geekgeekrun/puppeteer-extra-plugin-laodeng'),
|
||||
import('puppeteer-extra-plugin-anonymize-ua')
|
||||
]
|
||||
)
|
||||
puppeteer = importResult[0].default
|
||||
StealthPlugin = importResult[1].default
|
||||
LaodengPlugin = importResult[2].default
|
||||
AnonymizeUaPlugin = importResult[3].default
|
||||
puppeteer.use(StealthPlugin())
|
||||
puppeteer.use(LaodengPlugin())
|
||||
|
||||
puppeteer.use(AnonymizeUaPlugin())
|
||||
return {
|
||||
puppeteer,
|
||||
StealthPlugin,
|
||||
LaodengPlugin
|
||||
LaodengPlugin,
|
||||
AnonymizeUaPlugin
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
"element-plus": "^2.8.4",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-plugin-vue": "^9.20.1",
|
||||
"find-chrome-bin": "^2.0.4",
|
||||
"find-chrome-bin": "2.0.4",
|
||||
"js-yaml": "^4.1.0",
|
||||
"normalize.css": "^8.0.1",
|
||||
"prettier": "^3.2.4",
|
||||
|
||||
Reference in New Issue
Block a user