@@ -11,9 +11,9 @@ def search_on_web(query: str, search_engine: str = "Google", max_results: int =
11
11
12
12
Args:
13
13
query (str): The search query to find on the internet.
14
- search_engine (str, optional): Specifies the search engine to use, options include 'Google', 'DuckDuckGo', 'Bing', or 'SearcNGX '. Default is 'Google'.
14
+ search_engine (str, optional): Specifies the search engine to use, options include 'Google', 'DuckDuckGo', 'Bing', or 'SearXNG '. Default is 'Google'.
15
15
max_results (int, optional): The maximum number of search results to return.
16
- port (int, optional): The port number to use when searching with 'SearcNGX '. Default is 8080.
16
+ port (int, optional): The port number to use when searching with 'SearXNG '. Default is 8080.
17
17
18
18
Returns:
19
19
List[str]: A list of URLs as strings that are the search results.
@@ -53,7 +53,7 @@ def search_on_web(query: str, search_engine: str = "Google", max_results: int =
53
53
search_results .append (link )
54
54
return search_results
55
55
56
- elif search_engine .lower () == "searcngx " :
56
+ elif search_engine .lower () == "searxng " :
57
57
url = f"http://localhost:{ port } "
58
58
params = {"q" : query , "format" : "json" }
59
59
@@ -66,4 +66,4 @@ def search_on_web(query: str, search_engine: str = "Google", max_results: int =
66
66
return limited_results
67
67
68
68
else :
69
- raise ValueError ("The only search engines available are DuckDuckGo, Google, Bing, or SearcNGX " )
69
+ raise ValueError ("The only search engines available are DuckDuckGo, Google, Bing, or SearXNG " )
0 commit comments