Skip to content

Commit

Permalink
fix: Repeated Instantiation puppeteer
Browse files Browse the repository at this point in the history
  • Loading branch information
snowtafir committed Sep 17, 2024
1 parent d09f561 commit 1819eb8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# 2.0.4
* fix Repeated Instantiation puppeteer
* 优化获取B站登录ck
* 添加截图列队,优化配置文件注释

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yuki-plugin",
"version": "2.0.4-2",
"version": "2.0.4-3",
"author": "snowtafir",
"description": "优纪插件,yunzai-V4 关于 微博推送、B站推送 等功能的拓展插件",
"main": "./index",
Expand All @@ -15,13 +15,13 @@
"url": "https://gitee.com/snowtafir/yuki-plugin"
},
"dependencies": {
"axios": "^1.7.3",
"axios": "^1.7.7",
"chokidar": "^3.6.0",
"jsdom": "^24.1.1",
"md5": "^2.3.0",
"moment": "^2.30.1",
"node-fetch": "^3.3.2",
"puppeteer": "^23.3.0",
"puppeteer": "^23.3.1",
"qrcode": "^1.5.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand All @@ -47,13 +47,13 @@
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/yaml": "1.9.7",
"axios": "^1.7.3",
"axios": "^1.7.7",
"chokidar": "^3.6.0",
"jsdom": "^24.1.1",
"md5": "^2.3.0",
"nodemon":"3.1.4",
"node-fetch": "^3.3.2",
"puppeteer": "^23.3.0",
"puppeteer": "^23.3.1",
"qrcode": "^1.5.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
9 changes: 5 additions & 4 deletions utils/image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ class Image extends Picture {

/**
* 构造函数,整合截图方法
* @param launchOptions Puppeteer 启动选项,可选。父类有默认的设置。
*/
constructor() {
// 继承父类实例
super();
// 组件渲染对象
this.Com;
// 启动 Puppeteer
this.Pup.start();
// 父类已经实例化组件渲染对象
//this.Com;
// 父类已经实例化启动 Puppeteer
//this.Pup.start();
// 初始化 YukiPuppeteerRender 实例
this.yukiPuppeteerRender = new YukiPuppeteerRender(this.Pup);
}
Expand Down

0 comments on commit 1819eb8

Please sign in to comment.