mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: 更换延迟函数
This commit is contained in:
parent
494820dcf8
commit
2ed3658be2
1 changed files with 3 additions and 2 deletions
|
|
@ -358,8 +358,9 @@ export async function renderUrl (e, url, renderCfg = {}) {
|
|||
width: 1280,
|
||||
height: 720
|
||||
})
|
||||
/** 等待markdown-body加载完毕 */
|
||||
await page.waitForSelector(".vuepress-markdown-body")
|
||||
const sleep = ms => new Promise(res => setTimeout(res, ms));
|
||||
/** 等待1秒 */
|
||||
await sleep(1000);
|
||||
let buff = base64 = await page.screenshot({ fullPage: true })
|
||||
base64 = segment.image(buff)
|
||||
await page.close().catch((err) => logger.error(err))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue