-
-
Notifications
You must be signed in to change notification settings - Fork 13.4k
๐ style: add blockAds
& stealth
params for Browserless
#8255
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
@hezhijie0327 is attempting to deploy a commit to the LobeHub Community Team on Vercel. A member of the Team first needs to authorize it. |
Reviewer's GuideThis PR enhances the Browserless crawler by introducing two new environment-driven flagsโ File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
๐ @hezhijie0327 Thank you for raising your pull request and contributing to our Community |
TestGru AssignmentSummary
Tip You can |
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.
Hey @hezhijie0327 - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `packages/web-crawler/src/crawImpl/browserless.ts:39` </location>
<code_context>
+ qs.stringifyUrl({
+ query: {
+ blockAds: BROWSERLESS_BLOCK_ADS,
+ launch: `{"stealth":${BROWSERLESS_STEALTH_MODE}}`,
+ token: BROWSERLESS_TOKEN,
+ },
</code_context>
<issue_to_address>
Consider using JSON.stringify for the launch parameter to avoid manual string interpolation.
Using JSON.stringify({ stealth: BROWSERLESS_STEALTH_MODE }) reduces errors and improves maintainability if more properties are added.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
launch: `{"stealth":${BROWSERLESS_STEALTH_MODE}}`,
=======
launch: JSON.stringify({ stealth: BROWSERLESS_STEALTH_MODE }),
>>>>>>> REPLACE
</suggested_fix>
Help me be more useful! Please click ๐ or ๐ on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests โ
Additional details and impacted files@@ Coverage Diff @@
## main #8255 +/- ##
=========================================
Coverage 87.37% 87.38%
=========================================
Files 843 843
Lines 62876 62885 +9
Branches 4140 5671 +1531
=========================================
+ Hits 54941 54949 +8
- Misses 7935 7936 +1
Flags with carried forward coverage won't be shown. Click here to find out more. โ View full report in Codecov by Sentry. ๐ New features to boost your workflow:
|
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
|
blockAds
& stealth
params for BrowserlessblockAds
& stealth
params for Browserless
โค๏ธ Great PR @hezhijie0327 โค๏ธ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
### [Version 1.96.7](v1.96.6...v1.96.7) <sup>Released on **2025-06-23**</sup> #### ๐ Styles - **misc**: Add `blockAds` & `stealth` params for Browserless. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Styles * **misc**: Add `blockAds` & `stealth` params for Browserless, closes [#8255](#8255) ([2ff3efa](2ff3efa)) </details> <div align="right"> [](#readme-top) </div>
๐ This PR is included in version 1.96.7 ๐ The release is available on: Your semantic-release bot ๐ฆ๐ |
## [Version 1.95.0](v1.94.5...v1.95.0) <sup>Released on **2025-06-25**</sup> #### โจ Features - **misc**: Add Brave & Google PSE & Kagi as build-in Search Provider, add v0 (Vercel) provider support. #### ๐ Bug Fixes - **misc**: Fix `MiniMax-M1` reasoning tag missing, fix inputTemplate behavior, Google Gemini tools declarations, Remove unsupported parameters of Hunyuan. #### ๐ Styles - **openrouter**: Add stable versions of Gemini 2.5 models. - **misc**: Add `blockAds` & `stealth` params for Browserless, Optimized Gemini thinkingBudget configuration, update i18n, update i18n. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Add Brave & Google PSE & Kagi as build-in Search Provider, closes [lobehub#8172](https://github.com/jaworldwideorg/OneJA-Bot/issues/8172) ([16ae521](16ae521)) * **misc**: Add v0 (Vercel) provider support, closes [lobehub#8235](https://github.com/jaworldwideorg/OneJA-Bot/issues/8235) ([5842a18](5842a18)) #### What's fixed * **misc**: Fix `MiniMax-M1` reasoning tag missing, closes [lobehub#8240](https://github.com/jaworldwideorg/OneJA-Bot/issues/8240) ([ea76c11](ea76c11)) * **misc**: Fix inputTemplate behavior, closes [lobehub#8204](https://github.com/jaworldwideorg/OneJA-Bot/issues/8204) ([61c2c3c](61c2c3c)) * **misc**: Google Gemini tools declarations, closes [lobehub#8256](https://github.com/jaworldwideorg/OneJA-Bot/issues/8256) ([08f5d73](08f5d73)) * **misc**: Remove unsupported parameters of Hunyuan, closes [lobehub#8247](https://github.com/jaworldwideorg/OneJA-Bot/issues/8247) ([826d724](826d724)) #### Styles * **openrouter**: Add stable versions of Gemini 2.5 models, closes [lobehub#8239](https://github.com/jaworldwideorg/OneJA-Bot/issues/8239) ([d34ecab](d34ecab)) * **misc**: Add `blockAds` & `stealth` params for Browserless, closes [lobehub#8255](https://github.com/jaworldwideorg/OneJA-Bot/issues/8255) ([2ff3efa](2ff3efa)) * **misc**: Optimized Gemini thinkingBudget configuration, closes [lobehub#8224](https://github.com/jaworldwideorg/OneJA-Bot/issues/8224) ([03625e8](03625e8)) * **misc**: Update i18n, closes [lobehub#8253](https://github.com/jaworldwideorg/OneJA-Bot/issues/8253) ([b86dc9b](b86dc9b)) * **misc**: Update i18n, closes [lobehub#8242](https://github.com/jaworldwideorg/OneJA-Bot/issues/8242) ([2d1babc](2d1babc)) </details> <div align="right"> [](#readme-top) </div>
) * โจ feat: add blockAds & stealth params for Browserless * Apply `sourcery-ai` suggestion Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * ๐ docs: add docs for `BROWSERLESS_BLOCK_ADS` & `BROWSERLESS_STEALTH_MODE` --------- Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
### [Version 1.96.7](lobehub/lobe-chat@v1.96.6...v1.96.7) <sup>Released on **2025-06-23**</sup> #### ๐ Styles - **misc**: Add `blockAds` & `stealth` params for Browserless. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Styles * **misc**: Add `blockAds` & `stealth` params for Browserless, closes [lobehub#8255](lobehub#8255) ([2ff3efa](lobehub@2ff3efa)) </details> <div align="right"> [](#readme-top) </div>
) * โจ feat: add blockAds & stealth params for Browserless * Apply `sourcery-ai` suggestion Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * ๐ docs: add docs for `BROWSERLESS_BLOCK_ADS` & `BROWSERLESS_STEALTH_MODE` --------- Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
### [Version 1.96.7](lobehub/lobe-chat@v1.96.6...v1.96.7) <sup>Released on **2025-06-23**</sup> #### ๐ Styles - **misc**: Add `blockAds` & `stealth` params for Browserless. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Styles * **misc**: Add `blockAds` & `stealth` params for Browserless, closes [lobehub#8255](lobehub#8255) ([2ff3efa](lobehub@2ff3efa)) </details> <div align="right"> [](#readme-top) </div>
) * โจ feat: add blockAds & stealth params for Browserless * Apply `sourcery-ai` suggestion Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * ๐ docs: add docs for `BROWSERLESS_BLOCK_ADS` & `BROWSERLESS_STEALTH_MODE` --------- Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
### [Version 1.96.7](lobehub/lobe-chat@v1.96.6...v1.96.7) <sup>Released on **2025-06-23**</sup> #### ๐ Styles - **misc**: Add `blockAds` & `stealth` params for Browserless. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Styles * **misc**: Add `blockAds` & `stealth` params for Browserless, closes [lobehub#8255](lobehub#8255) ([4bb4fcc](lobehub@4bb4fcc)) </details> <div align="right"> [](#readme-top) </div>
๐ป ๅๆด็ฑปๅ | Change Type
๐ ๅๆด่ฏดๆ | Description of Change
blockAds
&stealth
ๅๆฐ๏ผ้ไฝ่ขซๆฃๆต่ชๅจๅ็็นๅพ๏ผๅฏ็จ็ฏๅขๅ้ๆงๅถBROWSERLESS_BLOCK_ADS
ๅBROWSERLESS_STEALTH_MODE
ๆๆกฃBROWSERLESS_BLOCK_ADS
BROWSERLESS_STEALTH_MODE
๐ ่กฅๅ ไฟกๆฏ | Additional Information
ref: ๆฃๆต็ฝ็ซ
https://bot.sannysoft.com
https://adblock-tester.com
Summary by Sourcery
Introduce blockAds and stealth parameters to the Browserless crawler, configurable via environment variables to reduce bot detection and block ads.
New Features: