mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
commit
3984965a1c
1 changed files with 5 additions and 3 deletions
|
@ -165,7 +165,7 @@ def sanitizeFileName(name):
|
|||
return name
|
||||
|
||||
|
||||
def getURL(url, post_data=None, headers=None, params=None, timeout=30, json=False):
|
||||
def getURL(url, post_data=None, headers=None, params=None, timeout=30, json=False, use_proxy=False):
|
||||
"""
|
||||
Returns a byte-string retrieved from the url provider.
|
||||
"""
|
||||
|
@ -186,8 +186,10 @@ def getURL(url, post_data=None, headers=None, params=None, timeout=30, json=Fals
|
|||
url = urlparse.urlunparse(parsed)
|
||||
|
||||
it = iter(req_headers)
|
||||
|
||||
if sickbeard.PROXY_SETTING:
|
||||
|
||||
|
||||
if use_proxy and sickbeard.PROXY_SETTING:
|
||||
logger.log("Using proxy for url: " + url, logger.DEBUG)
|
||||
proxies = {
|
||||
"http": sickbeard.PROXY_SETTING,
|
||||
"https": sickbeard.PROXY_SETTING,
|
||||
|
|
Loading…
Reference in a new issue