2016-04-19, 11:09
Since yesterday on
https://www.youtv.de/
i get the error::
URLError: <urlopen error [Errno 1] _ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLOslv3 alert handshake failure>
I Use:
Changing to http works, but im no fan of sending data (Login) without encryption
Mayby Someone has an idea what i could change
https://www.youtv.de/
i get the error::
URLError: <urlopen error [Errno 1] _ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLOslv3 alert handshake failure>
I Use:
Code:
def getUrl(url,data="x",token=""):
https=addon.getSetting("https")
if https=="true":
url=url.replace("https","http")
print("Get Url: " +url)
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor())
userAgent = "YOUTV/1.2.7 CFNetwork/758.2.8 Darwin/15.0.0"
if token!="":
mytoken="Token token="+ token
opener.addheaders = [('User-Agent', userAgent),
('Authorization', mytoken)]
else:
opener.addheaders = [('User-Agent', userAgent)]
try:
if data!="x" :
content=opener.open(url,data=data).read()
else:
content=opener.open(url).read()
except urllib2.HTTPError as e:
#print e.code
cc=e.read()
struktur = json.loads(cc)
error=struktur["errors"][0]
error=unicode(error).encode("utf-8")
debug("ERROR : " + error)
dialog = xbmcgui.Dialog()
nr=dialog.ok("Error", error)
return ""
opener.close()
return content
Changing to http works, but im no fan of sending data (Login) without encryption
Mayby Someone has an idea what i could change