Skip to content

Commit 7bde4e6

Browse files
committed
Let Python requests/urllib3 handle bad proxy issues
1 parent ad95d65 commit 7bde4e6

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

yagooglesearch/__init__.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -207,17 +207,6 @@ def __init__(
207207

208208
# Update proxy_dict if a proxy is provided.
209209
if proxy:
210-
urllib_object = urllib.parse.urlparse(self.proxy)
211-
# Standardize case since the scheme will be checked against a hard-coded list.
212-
scheme = urllib_object.scheme.lower()
213-
214-
if scheme not in ["http", "https", "socks5", "socks5h"]:
215-
ROOT_LOGGER.error(
216-
f'The provided proxy scheme "{scheme}" is not valid and must be either "http", "https", "socks5"'
217-
', or "socks5h"'
218-
)
219-
return []
220-
221210
self.proxy_dict = {
222211
"http": self.proxy,
223212
"https": self.proxy,

0 commit comments

Comments
 (0)