소스 검색

feat: add timeout

周玉环 2 주 전
부모
커밋
1ae8b587cd
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      server/script-browser.js

+ 1 - 2
server/script-browser.js

@@ -29,8 +29,7 @@ export default async function () {
   // targetUrlWithoutProtocol = targetUrlWithoutProtocol.replace('https://', '');
   try {
     await page.goto(targetUrl, {
-      timeout: 120000,
-      waitUntil: "networkidle", // 等待网络稳定再继续(适合截图)
+      timeout: 120000
     });
     await page.screenshot({ path: `screenshots/screenshot_${timeStamp}.png` });
   } finally {