Skip to content

Commit

Permalink
feat: 收集报错
Browse files Browse the repository at this point in the history
  • Loading branch information
14790897 committed Apr 3, 2024
1 parent e574e50 commit 3b12c3b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cron_read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
node-version: [16.x] # 选择你需要的 Node.js 版本
node-version: [20.x] # 选择你需要的 Node.js 版本

steps:
- uses: actions/checkout@v3 # 检出你的仓库
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [16.x] # 选择你需要的 Node.js 版本
node-version: [20.x] # 选择你需要的 Node.js 版本

steps:
- uses: actions/checkout@v3 # 检出你的仓库
Expand Down
6 changes: 6 additions & 0 deletions pteer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ require("dotenv").config();
}
const browser = await puppeteer.launch({ headless: true });
const page = await browser.newPage();
page.on("pageerror", (error) => {
console.error(`Page error: ${error.message}`);
});
page.on("error", (error) => {
console.error(`Error: ${error.message}`);
});
//登录操作
await page.goto("https://linux.do", { timeout: 60000 });
// 使用XPath查询找到包含"登录"或"login"文本的按钮
Expand Down

0 comments on commit 3b12c3b

Please sign in to comment.