raptor2101 / Mediathek

GNU General Public License v3.0
45 stars 16 forks source link

Some recordings not accessible (due to SSL: CERTIFICATE_VERIFY_FAILED) #94

Closed quickstep2 closed 6 years ago

quickstep2 commented 7 years ago

Some recordings of Arte+7 are not accessible. Reason for this: SSL CERITFICATE_VERIFYFAILED error on read statement sock = urllib2.urlopen( req ) in mediathek\__init_\.py:77 In the error log this error is only reported as "No JSON object could be decoded" (see below).

Quick (and dirty) solution: switch off the verification by replacing the urlopen(...) statement with:

quickstep2 start

      #sock = urllib2.urlopen( req )
      import ssl
      gcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1)  # Only for gangstars
      sock = urllib2.urlopen(req, context=gcontext)
      # quickstep2 end

A better solution would be, to inform the user about the certificate problem, offering a dialog with \\/\ option.

Problemreport in kodi.log: 07:50:26.337 T:2276 DEBUG: [Mediathek]: download https://api.arte.tv/api/player/v1/config/de/064384-007-A 32 07:50:26.488 T:2276 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

raptor2101 commented 6 years ago

should be solved by moving to requests