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:
陈志谦
2026-09-08 12:55:52 +08:00
committed by GitHub
parent 1b855b4ff9
commit 98c067c22a

View File

@@ -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,