Skip to content

Commit 983e7de

Browse files
authored
Merge pull request #31 from opsdisk/issue-14-fix-proxy-variable
Fix proxy variable
2 parents 451c2bf + 7bde4e6 commit 983e7de

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="yagooglesearch",
8-
version="1.8.0",
8+
version="1.8.1",
99
author="Brennon Thomas",
1010
author_email="info@opsdisk.com",
1111
description="A Python library for executing intelligent, realistic-looking, and tunable Google searches.",

yagooglesearch/__init__.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import logging
33
import os
44
import random
5-
import sys
65
import time
76
import urllib
87

@@ -12,7 +11,7 @@
1211

1312
# Custom Python libraries.
1413

15-
__version__ = "1.8.0"
14+
__version__ = "1.8.1"
1615

1716
# Logging
1817
ROOT_LOGGER = logging.getLogger("yagooglesearch")
@@ -208,19 +207,6 @@ def __init__(
208207

209208
# Update proxy_dict if a proxy is provided.
210209
if proxy:
211-
# Standardize case since the scheme will be checked against a hard-coded list.
212-
self.proxy = proxy.lower()
213-
214-
urllib_object = urllib.parse.urlparse(self.proxy)
215-
scheme = urllib_object.scheme
216-
217-
if scheme not in ["http", "https", "socks5", "socks5h"]:
218-
ROOT_LOGGER.error(
219-
f'The provided proxy scheme ("{scheme}") is not valid and must be either "http", "https", "socks5"'
220-
', or "socks5h"'
221-
)
222-
sys.exit(1)
223-
224210
self.proxy_dict = {
225211
"http": self.proxy,
226212
"https": self.proxy,

0 commit comments

Comments
 (0)