fix(brightdata): drop stray $ in f-string search URLs - #7326
Conversation
get_search_url interpolated ${query} inside an f-string, producing
URLs like https://www.bing.com/search?q=$test. The URL is passed
straight to the SERP request, so every search carried the malformed
query string.
Fixes crewAIInc#7325
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe BrightData SERP tool now generates Yandex, Bing, and Google search URLs with the raw query value instead of a leading dollar character. ChangesBrightData search URL correction
Priority: ➖ Normal — Impact reflects medium issue severity. Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to BrightData Yandex, Bing, and Google searches now send the intended query text rather than a dollar-prefixed query. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Vidit-Ostwal
left a comment
There was a problem hiding this comment.
Looks good — ${query} in those f-strings is a literal $, so every Bright Data SERP URL was malformed. Dropping it on Google/Bing/Yandex is the right fix.
I'll merge this. The older overlapping PR (#5518) is being closed in favor of this one.
Fixes #7325
BrightDataSERPTool.get_search_urlinterpolated${query}inside f-strings, so the three engine URLs (yandex/bing/google) carried a literal$before the query — and the URL goes straight to the SERP request, so every search was malformed. Now interpolates{query}normally, verified by callingget_search_urldirectly.(Note: this PR was prepared with AI assistance — happy to see it labeled
llm-generatedper the contributing guidelines.)