-
Notifications
You must be signed in to change notification settings - Fork 90
Description
and it goes headless instead of "--no-headless"
google-search --no-headless "china wall" --get-html
(node:23471) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Usenode --trace-warnings ...to show where the warning was created)
[2025-07-05 22:30:02] INFO: 正在初始化浏览器以获取搜索页面HTML...
options: {
"limit": 10,
"timeout": 30000,
"headless": false,
"stateFile": "./browser-state.json",
"saveState": true,
"getHtml": true
}
[2025-07-05 22:30:02] INFO: 发现浏览器状态文件,将使用保存的浏览器状态以避免反机器人检测
stateFile: "./browser-state.json"
[2025-07-05 22:30:02] INFO: 已加载保存的浏览器指纹配置
[2025-07-05 22:30:02] INFO: 浏览器已成功启动!
[2025-07-05 22:30:02] INFO: 使用保存的浏览器指纹配置
[2025-07-05 22:30:02] INFO: 正在加载保存的浏览器状态...
[2025-07-05 22:30:02] INFO: 使用保存的Google域名
domain: "https://www.google.com"
[2025-07-05 22:30:02] INFO: 正在访问Google搜索页面...
错误: Error: 获取Google搜索页面HTML失败: page.goto: Timeout 30000ms exceeded.
Call log:
-
navigating to "https://www.google.com/", waiting until "networkidle"
at performSearchAndGetHtml (file:///home/user/google-search/dist/src/search.js:1321:19)
at async Command. (file:///home/user/google-search/dist/src/index.js:26:32)
[2025-07-05 22:30:32] ERROR: 获取页面HTML过程中发生错误
error: {
"name": "TimeoutError"
}
[2025-07-05 22:30:32] INFO: 正在保存浏览器状态...
stateFile: "./browser-state.json"
[2025-07-05 22:30:32] INFO: 指纹配置已保存
fingerprintFile: "./browser-state-fingerprint.json"
[2025-07-05 22:30:32] INFO: 正在关闭浏览器...
[2025-07-05 22:30:32] INFO: 进程退出,日志关闭