From 2ed3658be25b5254bb1b519dc92475e8bf41cb4e Mon Sep 17 00:00:00 2001 From: huvz Date: Mon, 1 Apr 2024 16:26:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=8D=A2=E5=BB=B6=E8=BF=9F?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/common.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/common.js b/utils/common.js index 17f33b7..18acab1 100644 --- a/utils/common.js +++ b/utils/common.js @@ -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))