Skip to content

Commit 8762a01

Browse files
committed
Update research_web.py
1 parent c3cdff7 commit 8762a01

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

scrapegraphai/utils/research_web.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,19 @@ def search_on_web(
5454
results = []
5555
if search_engine == "google":
5656

57-
if region is not None and language is not None:
57+
if region and language:
5858
results = list(
5959
google_search(
6060
query, num_results=max_results, proxy=formatted_proxy,
6161
lang= language, region=region)
6262
)
63-
elif region is not None:
63+
elif region:
6464
results = list(
6565
google_search(
6666
query, num_results=max_results, proxy=formatted_proxy,
6767
region=region)
6868
)
69-
elif language is not None:
69+
elif language:
7070
results = list(
7171
google_search(
7272
query, num_results=max_results, proxy=formatted_proxy,
@@ -77,7 +77,6 @@ def search_on_web(
7777
google_search(
7878
query, num_results=max_results, proxy=formatted_proxy)
7979
)
80-
print(results)
8180

8281
elif search_engine == "duckduckgo":
8382
research = DuckDuckGoSearchResults(max_results=max_results)

0 commit comments

Comments
 (0)