#87 fix ssl comicvine communication

This commit is contained in:
Davide Romanini 2017-04-07 17:28:10 +02:00
parent 4ff2061568
commit 14713d8ad0

View File

@ -21,6 +21,7 @@ import re
import time
import datetime
import sys
import ssl
#from pprint import pprint
#import math
@ -184,7 +185,8 @@ class ComicVineTalker(QObject):
# print "ATB---", url
for tries in range(3):
try:
resp = urllib2.urlopen(url)
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
resp = urllib2.urlopen(url, context=context)
return resp.read()
except urllib2.HTTPError as e:
if e.getcode() == 500: