Skip to content

Commit

Permalink
fix proxy settings
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tani committed Jul 19, 2024
1 parent 7eb718b commit 290d8f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion googlesearch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def search(term, num_results=10, lang="en", proxy=None, advanced=False, sleep_in
escaped_term = term.replace(" ", "+")

# Proxy setup
proxies = {"https": proxy} if proxy and proxy.startswith("https") else {"http": proxy} if proxy else None
proxies = {"https": proxy, "http": proxy} if proxy and (proxy.startswith("https") or proxy.startswith("http")) else None

start = 0
fetched_results = 0 # Keep track of the total fetched results
Expand Down

0 comments on commit 290d8f8

Please sign in to comment.