mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
use proxies
This commit is contained in:
parent
f8ec897010
commit
aae27f36f6
@ -313,7 +313,12 @@ class KATProvider(generic.TorrentProvider):
|
||||
parsed[2] = re.sub("/{2,}", "/", parsed[2]) # replace two or more / with one
|
||||
url = urlparse.urlunparse(parsed)
|
||||
|
||||
r = requests.get(url)
|
||||
proxies = {
|
||||
"http": "http://192.168.1.11:8118",
|
||||
"https": "http://192.168.1.11:8118",
|
||||
}
|
||||
|
||||
r = requests.get(url, proxies=proxies)
|
||||
except (requests.exceptions.ConnectionError, requests.exceptions.HTTPError), e:
|
||||
logger.log(u"Error loading " + self.name + " URL: " + str(sys.exc_info()) + " - " + ex(e), logger.ERROR)
|
||||
return None
|
||||
|
@ -307,8 +307,13 @@ class ThePirateBayProvider(generic.TorrentProvider):
|
||||
if self.proxy.isEnabled():
|
||||
headers.update({'referer': self.proxy.getProxyURL()})
|
||||
|
||||
proxies = {
|
||||
"http": "http://192.168.1.11:8118",
|
||||
"https": "http://192.168.1.11:8118",
|
||||
}
|
||||
|
||||
try:
|
||||
r = requests.get(url, headers=headers)
|
||||
r = requests.get(url, headers=headers, proxies=proxies)
|
||||
except (requests.exceptions.ConnectionError, requests.exceptions.HTTPError), e:
|
||||
logger.log(u"Error loading " + self.name + " URL: " + str(sys.exc_info()) + " - " + ex(e), logger.ERROR)
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user