Skip to content

Commit

Permalink
Update research_web.py
Browse files Browse the repository at this point in the history
  • Loading branch information
VinciGit00 committed Jan 12, 2025
1 parent dc0a138 commit 443cf14
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions scrapegraphai/utils/research_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def search_on_web(
proxy: str | dict = None,
serper_api_key: str = None,
region: str = None,
language: str = None,
language: str = "en",
) -> List[str]:
"""Search web function with improved error handling and validation
Expand Down Expand Up @@ -71,20 +71,12 @@ def search_on_web(
num_results=max_results,
proxy=formatted_proxy,
region=region,
)
)
elif language:
results = list(
google_search(
query,
num_results=max_results,
proxy=formatted_proxy,
lang=language,
)
)
else:
results = list(
google_search(query, num_results=max_results, proxy=formatted_proxy)
google_search(query, num_results=max_results, proxy=formatted_proxy, lang=language)
)

elif search_engine == "duckduckgo":
Expand Down

0 comments on commit 443cf14

Please sign in to comment.