-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(tool): browser search bing engine & app updater #253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ycjcl868
commented
Mar 21, 2025
- feat(tool): browser search bing engine
- feat(agent-tars): app updater
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #253 +/- ##
========================================
- Coverage 4.70% 4.69% -0.01%
========================================
Files 253 253
Lines 7756 7769 +13
Branches 1447 1450 +3
========================================
Hits 365 365
- Misses 7351 7364 +13
Partials 40 40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pageFunction: searchEngine.extractSearchResults, | ||
pageFunctionParams: [], | ||
beforePageLoad: async (page) => { | ||
await interceptRequest(page); | ||
}, | ||
afterPageLoad: async (page) => { | ||
await page.waitForSelector('.b_pag'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是会导致 local browser search 只能在 bing 下面工作?baidu 现在现在不 work 了
@@ -119,11 +121,17 @@ export class BrowserSearch { | |||
|
|||
let links = await browser.evaluateOnNewPage({ | |||
url, | |||
waitForOptions: { | |||
waitUntil: 'networkidle0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里还有个 Breaking Change,之前 Browser Search 是采用默认值 networkidle2,现在是 networkidle0,Browser Search 这种场景 networkidle2 应该够用了
Refs:
- 如果你需要尽快捕获页面(比如只需要 DOM 加载完成,不关心后续的异步请求),用 networkidle2。
- 如果你需要确保页面所有资源(包括图片、脚本等)都加载完成,用 networkidle0。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
试了下 networkidle2 拿不到数据,失败概率比较高