prof-membrane / plugin.video.zdf_de_lite

ZDF Mediathek
GNU General Public License v2.0
0 stars 0 forks source link

Content nicht mehr abrufbar #20

Closed gibso closed 6 years ago

gibso commented 6 years ago

Hallo @prof-membrane,

ich kann in meinem Kodi unter Linux und Android leider keine ZDF Sendungen mehr abrufen. Es wird immer folgender Fehler geschmissen:

19:06:53.593 T:140123955926784  NOTICE: PulseAudio: Opened device Default in pcm mode with Buffersize 150 ms
19:06:55.300 T:140123643442944   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'urllib2.HTTPError'>
                                            Error Contents: HTTP Error 403: Forbidden
                                            Traceback (most recent call last):
                                              File "/home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py", line 5, in <module>
                                                libzdf.list()
                                              File "/home/oliver/.kodi/addons/script.module.libzdf/lib/libzdf.py", line 103, in list
                                                l = modes.get(mode,libZdfListMain)()
                                              File "/home/oliver/.kodi/addons/script.module.libzdf/lib/libzdf.py", line 41, in libZdfListPage
                                                return libZdfJsonParser.parsePage(params['url'])
                                              File "/home/oliver/.kodi/addons/script.module.libzdf/lib/libzdfjsonparser.py", line 19, in parsePage
                                                response = libMediathek.getUrl(url,getheader)
                                              File "/home/oliver/.kodi/addons/script.module.libmediathek3/lib/libmediathek3utils.py", line 25, in getUrl
                                                return _request(url,headers)
                                              File "/home/oliver/.kodi/addons/script.module.libmediathek3/lib/libmediathek3utils.py", line 35, in _request
                                                response = urllib2.urlopen(req)
                                              File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
                                                return opener.open(url, data, timeout)
                                              File "/usr/lib/python2.7/urllib2.py", line 435, in open
                                                response = meth(req, response)
                                              File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
                                                'http', request, response, code, msg, hdrs)
                                              File "/usr/lib/python2.7/urllib2.py", line 473, in error
                                                return self._call_chain(*args)
                                              File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
                                                result = func(*args)
                                              File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
                                                raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
                                            HTTPError: HTTP Error 403: Forbidden
                                            -->End of Python script error report<--
19:06:55.335 T:140124480096640   ERROR: GetDirectory - Error getting plugin://plugin.video.zdf_de_lite/?mode=libZdfListPage&url=https%3a%2f%2fapi.zdf.de%2fcontent%2fdocuments%2fmeist-gesehen-100.json%3fprofile%3ddefault
19:06:55.337 T:140124480096640   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.zdf_de_lite/?mode=libZdfListPage&url=https%3a%2f%2fapi.zdf.de%2fcontent%2fdocuments%2fmeist-gesehen-100.json%3fprofile%3ddefault) failed

Es wird also ein 403er geschmissen. Hängt das mit der Authentifizierungsproblematik aus Issue #15 zusammen? Ich freu mich auf deine potenzielle Hilfe ;-).

VG, Oliver.

gibso commented 6 years ago

hi @prof-membrane, ich habe gerade erst deine Spezifikationen an Issues gelesen. Denen möchte ich selbstverständlich nachkommen.

Betriebssystem: Ubuntu 16.04.

Kodi Version: 17.4

Add-on Version: 4.1.0

Bibliothek: libZdf 2.1.3

Bibliothek: libMediathek3 1.4.1

Detailierte Fehlerbeschreibung: Es ist kein Content abrufbar. Das Addon an sich lässt sich zwar öffnen, aber keine Unterordner die Videos enthalten, wie "Meistgesehene" oder "Sendungen A-Z".

Die komplette kodi.log mit aktivierter Debug Funktion findest du bei pastebin relevant ist aber vermutlich nur Zeile 2676 bis 2741

19:41:40.576 T:139650651907840   DEBUG: StartScript - calling plugin ZDF Mediathek('plugin://plugin.video.zdf_de_lite/','2','?mode=libZdfListShows')
19:41:40.577 T:139648815568640   DEBUG: Thread LanguageInvoker start, auto delete: false
19:41:40.577 T:139648815568640    INFO: initializing python engine.
19:41:40.577 T:139648815568640   DEBUG: CPythonInvoker(11, /home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py): start processing
19:41:40.643 T:139648815568640   DEBUG: -->Python Interpreter Initialized<--
19:41:40.643 T:139648815568640   DEBUG: CPythonInvoker(11, /home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py): the source file to load is "/home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py"
19:41:40.643 T:139648815568640   DEBUG: CPythonInvoker(11, /home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py): setting the Python path to /home/oliver/.kodi/addons/plugin.video.zdf_de_lite:/home/oliver/.kodi/addons/script.module.libmediathek3/lib:/home/oliver/.kodi/addons/script.module.libzdf/lib:/usr/lib/python2.7:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/home/oliver/.local/lib/python2.7/site-packages:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PILcompat:/usr/lib/python2.7/dist-packages/gtk-2.0
19:41:40.643 T:139648815568640   DEBUG: CPythonInvoker(11, /home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py): entering source directory /home/oliver/.kodi/addons/plugin.video.zdf_de_lite
19:41:40.643 T:139648815568640   DEBUG: CPythonInvoker(11, /home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py): instantiating addon using automatically obtained id of "plugin.video.zdf_de_lite" dependent on version 2.25.0 of the xbmc.python api
19:41:40.731 T:139648815568640   DEBUG: ffc9a283b511b7e11b326fdc3d76c5559b50544e reraeB
19:41:40.731 T:139648815568640   DEBUG: https://api.zdf.de/content/documents/sendungen-100.json?profile=default
19:41:41.074 T:139652302465408   DEBUG: Previous line repeats 1 times.
19:41:41.074 T:139652302465408   DEBUG: ------ Window Init (DialogBusy.xml) ------
19:41:41.206 T:139648815568640   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'urllib2.HTTPError'>
                                            Error Contents: HTTP Error 403: Forbidden
                                            Traceback (most recent call last):
                                              File "/home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py", line 5, in <module>
                                                libzdf.list()
                                              File "/home/oliver/.kodi/addons/script.module.libzdf/lib/libzdf.py", line 93, in list
                                                l = modes.get(mode,libZdfListMain)()
                                              File "/home/oliver/.kodi/addons/script.module.libzdf/lib/libzdf.py", line 37, in libZdfListShows
                                                return libZdfJsonParser.getAZ()
                                              File "/home/oliver/.kodi/addons/script.module.libzdf/lib/libzdfjsonparser.py", line 44, in getAZ
                                                response = libMediathek.getUrl("https://api.zdf.de/content/documents/sendungen-100.json?profile=default",getheader5)
                                              File "/home/oliver/.kodi/addons/script.module.libmediathek3/lib/libmediathek3utils.py", line 28, in getUrl
                                                return _request(url,headers,post)
                                              File "/home/oliver/.kodi/addons/script.module.libmediathek3/lib/libmediathek3utils.py", line 52, in _request
                                                response = urllib2.urlopen(req)
                                              File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
                                                return opener.open(url, data, timeout)
                                              File "/usr/lib/python2.7/urllib2.py", line 435, in open
                                                response = meth(req, response)
                                              File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
                                                'http', request, response, code, msg, hdrs)
                                              File "/usr/lib/python2.7/urllib2.py", line 473, in error
                                                return self._call_chain(*args)
                                              File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
                                                result = func(*args)
                                              File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
                                                raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
                                            HTTPError: HTTP Error 403: Forbidden
                                            -->End of Python script error report<--
19:41:41.212 T:139648815568640    INFO: Python script stopped
19:41:41.212 T:139648815568640   DEBUG: Thread LanguageInvoker 139648815568640 terminating
19:41:41.215 T:139652302465408   DEBUG: ------ Window Init (DialogNotification.xml) ------
19:41:41.231 T:139652302465408   ERROR: GetDirectory - Error getting plugin://plugin.video.zdf_de_lite/?mode=libZdfListShows
19:41:41.232 T:139652302465408   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.zdf_de_lite/?mode=libZdfListShows) failed
19:41:41.233 T:139652302465408   DEBUG: CGUIMediaWindow::GetDirectory (plugin://plugin.video.zdf_de_lite/)
19:41:41.233 T:139652302465408   DEBUG:   ParentPath = [plugin://plugin.video.zdf_de_lite/]
19:41:41.237 T:139651795080960   DEBUG: CAddonDatabase::SetLastUsed[plugin.video.zdf_de_lite] took 4 ms
19:41:41.238 T:139650643515136   DEBUG: StartScript - calling plugin ZDF Mediathek('plugin://plugin.video.zdf_de_lite/','3','')
19:41:41.238 T:139648815568640   DEBUG: Thread LanguageInvoker start, auto delete: false
19:41:41.238 T:139648815568640    INFO: initializing python engine.
19:41:41.238 T:139648815568640   DEBUG: CPythonInvoker(12, /home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py): start processing
19:41:41.299 T:139648815568640   DEBUG: -->Python Interpreter Initialized<--
19:41:41.300 T:139648815568640   DEBUG: CPythonInvoker(12, /home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py): the source file to load is "/home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py"
19:41:41.300 T:139648815568640   DEBUG: CPythonInvoker(12, /home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py): setting the Python path to /home/oliver/.kodi/addons/plugin.video.zdf_de_lite:/home/oliver/.kodi/addons/script.module.libmediathek3/lib:/home/oliver/.kodi/addons/script.module.libzdf/lib:/usr/lib/python2.7:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/home/oliver/.local/lib/python2.7/site-packages:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PILcompat:/usr/lib/python2.7/dist-packages/gtk-2.0
19:41:41.300 T:139648815568640   DEBUG: CPythonInvoker(12, /home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py): entering source directory /home/oliver/.kodi/addons/plugin.video.zdf_de_lite
19:41:41.300 T:139648815568640   DEBUG: CPythonInvoker(12, /home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py): instantiating addon using automatically obtained id of "plugin.video.zdf_de_lite" dependent on version 2.25.0 of the xbmc.python api
19:41:41.388 T:139648815568640   DEBUG: ffc9a283b511b7e11b326fdc3d76c5559b50544e reraeB
19:41:41.389 T:139648815568640   DEBUG: ###Krypton workaround: removing lock...
19:41:41.734 T:139652302465408   DEBUG: ------ Window Init (DialogBusy.xml) ------
19:41:41.738 T:139648815568640    INFO: CPythonInvoker(12, /home/oliver/.kodi/addons/plugin.video.zdf_de_lite/default.py): script successfully run
19:41:41.745 T:139648815568640    INFO: Python script stopped
StarPicard commented 6 years ago

Hallo, ich habe genau den gleichen Fehler, mit denselben Ausgaben im Log. Darf ich fragen, ob und wie der Fehler bei Dir gelöst wurde?

gibso commented 6 years ago

Hi @StarPicard, der Fehler liegt in der Bibliothek libZdf. Dort ist ein API-Key hinterlegt, den man vom ZDF benötigt. Nur ändert das ZDF in letzter Zeit immer wieder den Key. Normalerweise reagiert @prof-membrane sehr schnell auf solche Änderungen und veröffentlicht dann umgehend ein Update von der Bibliothek. Die letzte Version findest du immer im Repository von membrane: https://github.com/prof-membrane/repository.membrane/tree/master/script.module.libzdf

Die Zip Datei kannst du in Kodi als "Addon aus einer Zip-Datei" installieren.

prof-membrane commented 6 years ago

Oder am besten mein Repo installieren.

Die neue Version nimmt nun immer die aktuellen Keys der Webseite. Hoffentlich gibt es bald eine elegante und dauerhafte Lösung.