mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-09-20 10:03:37 +00:00
fix(brightdata): drop stray $ in f-string search URLs (#7326)
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 #7325
This commit is contained in:
@@ -131,10 +131,10 @@ class BrightDataSearchTool(BaseTool):
|
||||
|
||||
def get_search_url(self, engine: str, query: str) -> str:
|
||||
if engine == "yandex":
|
||||
return f"https://yandex.com/search/?text=${query}"
|
||||
return f"https://yandex.com/search/?text={query}"
|
||||
if engine == "bing":
|
||||
return f"https://www.bing.com/search?q=${query}"
|
||||
return f"https://www.google.com/search?q=${query}"
|
||||
return f"https://www.bing.com/search?q={query}"
|
||||
return f"https://www.google.com/search?q={query}"
|
||||
|
||||
def _run(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user