1
0
mirror of https://github.com/moparisthebest/SickRage synced 2025-01-05 10:58:01 -05:00

Fix for SSL issues

This commit is contained in:
echel0n 2014-04-25 04:25:22 -07:00
parent 6d3f66aa4d
commit 0d90d01460
6 changed files with 13 additions and 13 deletions

View File

@ -200,7 +200,7 @@ def main():
print "Opening URL: " + url + ' with params=' + str(params)
try:
response = requests.get(url, auth=(username, password), params=params)
response = requests.get(url, auth=(username, password), params=params, verify=False)
except Exception, e:
scriptlogger.error(u': Unknown exception raised when opening url: ' + ex(e))
time.sleep(3)

View File

@ -191,9 +191,9 @@ Returns a byte-string retrieved from the url provider.
"https": sickbeard.PROXY_SETTING,
}
resp = requests.get(url, params=params, data=post_data, headers=dict(zip(it, it)), proxies=proxies)
resp = requests.get(url, params=params, data=post_data, headers=dict(zip(it, it)), proxies=proxies, verify=False)
else:
resp = requests.get(url, params=params, data=post_data, headers=dict(zip(it, it)))
resp = requests.get(url, params=params, data=post_data, headers=dict(zip(it, it)), verify=False)
except requests.HTTPError, e:
logger.log(u"HTTP error " + str(e.errno) + " while loading URL " + url, logger.WARNING)
return None
@ -218,7 +218,7 @@ def _remove_file_failed(file):
def download_file(url, filename):
try:
r = requests.get(url, stream=True)
r = requests.get(url, stream=True, verify=False)
with open(filename, 'wb') as fp:
for chunk in r.iter_content(chunk_size=1024):
if chunk:

View File

@ -319,9 +319,9 @@ class KATProvider(generic.TorrentProvider):
"https": sickbeard.PROXY_SETTING,
}
r = requests.get(url, proxies=proxies)
r = requests.get(url, proxies=proxies, verify=False)
else:
r = requests.get(url)
r = requests.get(url, verify=False)
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
@ -345,7 +345,7 @@ class KATProvider(generic.TorrentProvider):
return False
try:
r = requests.get('http://torcache.net/torrent/' + torrent_hash + '.torrent')
r = requests.get('http://torcache.net/torrent/' + torrent_hash + '.torrent', verify=False)
except Exception, e:
logger.log("Unable to connect to Torcache: " + ex(e), logger.ERROR)
return False

View File

@ -236,7 +236,7 @@ class PublicHDProvider(generic.TorrentProvider):
return False
try:
r = requests.get('http://torcache.net/torrent/' + torrent_hash + '.torrent')
r = requests.get('http://torcache.net/torrent/' + torrent_hash + '.torrent', verify=False)
except Exception, e:
logger.log("Unable to connect to Torcache: " + ex(e), logger.ERROR)
return False

View File

@ -314,9 +314,9 @@ class ThePirateBayProvider(generic.TorrentProvider):
"https": sickbeard.PROXY_SETTING,
}
r = requests.get(url, headers=headers, proxies=proxies)
r = requests.get(url, headers=headers, proxies=proxies, verify=False)
else:
r = requests.get(url, headers=headers)
r = requests.get(url, headers=headers, verify=False)
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
@ -340,7 +340,7 @@ class ThePirateBayProvider(generic.TorrentProvider):
return False
try:
r = requests.get('http://torcache.net/torrent/' + torrent_hash + '.torrent')
r = requests.get('http://torcache.net/torrent/' + torrent_hash + '.torrent', verify=False)
except Exception, e:
logger.log("Unable to connect to Torcache: " + ex(e), logger.ERROR)
return False

View File

@ -266,13 +266,13 @@ def _xem_refresh(indexer_id):
u'Looking up XEM scene mapping for show %s on %s' % (indexer_id, sickbeard.indexerApi(indexer).name,),
logger.DEBUG)
data = requests.get("http://thexem.de/map/all?id=%s&origin=%s&destination=scene" % (
indexer_id, sickbeard.indexerApi(indexer).config['xem_origin'],)).json()
indexer_id, sickbeard.indexerApi(indexer).config['xem_origin'],), verify=False).json()
if data is None or data == '':
logger.log(u'No XEN data for show "%s on %s", trying TVTumbler' % (
indexer_id, sickbeard.indexerApi(indexer).name,), logger.MESSAGE)
data = requests.get("http://show-api.tvtumbler.com/api/thexem/all?id=%s&origin=%s&destination=scene" % (
indexer_id, sickbeard.indexerApi(indexer).config['xem_origin'],)).json()
indexer_id, sickbeard.indexerApi(indexer).config['xem_origin'],), verify=False).json()
if data is None or data == '':
logger.log(u'TVTumbler also failed for show "%s on %s". giving up.' % (indexer_id, indexer,),
logger.MESSAGE)