Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 403 Forbidden #14

Closed
Itja opened this issue Jan 11, 2018 · 4 comments
Closed

HTTP 403 Forbidden #14

Itja opened this issue Jan 11, 2018 · 4 comments

Comments

@Itja
Copy link

Itja commented Jan 11, 2018

Hi again, I hope you started well into 2018! :-)

I'm running into trouble trying to start any episode, clip or other video from ZDF Mediathek using the current master version of your plugin (from 2017-12-22). As I'm getting a 403: Is it possible that ZDF changed authentication somehow?

Here the log output of a single try of opening something, the same episode is available on the web browser here. I'm still using Kodi 16.1, so it could be me.

17:45:06 T:2672939952  NOTICE: ZDF Mediathek 2016 [9]: [Plugin] - Python-Version: /usr/bin/python 2.7.9 (default, Aug 13 2016, 18:15:29)
                                            [GCC 4.9.2]
17:45:06 T:2672939952  NOTICE: ZDF Mediathek 2016 [9]: [Plugin] - executing url=plugin://plugin.video.zdf_de_2016/?pagelet=PlayVideo&genre=Show+%7C+Bares+f%C3%BCr+Rares&contentName=bares-fuer-rares-vom-2-januar-2018-100&videoUrl=%2Fshow%2Fbares-fuer-rares%2Fbares-fuer-rares-vom-2-januar-2018-100.html&title=%28%3E%29+Bares+f%C3%BCr+Rares+vom+2.+Januar+2018 ...
17:45:06 T:2672939952  NOTICE: ZDF Mediathek 2016 [9]: [TokenCache] - loading api-token '71f18d1df774fbf61390bd6bf419e8e17dd7f484' from store-file '/home/odroid/.kodi/userdata/addon_data/plugin.video.zdf_de_2016/tokenCache.txt'
17:45:06 T:2672939952  NOTICE: ZDF Mediathek 2016 [9]: [PlayVideo] - Timer - parsing url='https://api.zdf.de/content/documents/bares-fuer-rares-vom-2-januar-2018-100.json?profile=player' ...
17:45:06 T:2672939952  NOTICE: ZDF Mediathek 2016 [9]: [VideoContentResource] - Timer - loading url='https://api.zdf.de/content/documents/bares-fuer-rares-vom-2-januar-2018-100.json?profile=player' ...
17:45:07 T:2672939952  NOTICE: ZDF Mediathek 2016 [9]: [PlayVideo] - Timer - parsing url='https://www.zdf.de/show/bares-fuer-rares/bares-fuer-rares-vom-2-januar-2018-100.html' ...
17:45:07 T:2672939952  NOTICE: ZDF Mediathek 2016 [9]: [VideoResource] - Timer - loading url='https://www.zdf.de/show/bares-fuer-rares/bares-fuer-rares-vom-2-januar-2018-100.html' ...
17:45:08 T:2672939952  NOTICE: ZDF Mediathek 2016 [9]: [VideoResource] - Timer - loading url='https://www.zdf.de/show/bares-fuer-rares/bares-fuer-rares-vom-2-januar-2018-100.html' ... done. [507 ms]
17:45:08 T:2672939952  NOTICE: ZDF Mediathek 2016 [9]: [PlayVideo] - Timer - parsing url='https://www.zdf.de/show/bares-fuer-rares/bares-fuer-rares-vom-2-januar-2018-100.html' ... done. [523 ms]
17:45:08 T:2672939952  NOTICE: ZDF Mediathek 2016 [9]: [TokenCache] - saving api-token '71f18d1df774fbf61390bd6bf419e8e17dd7f484' to store-file '/home/odroid/.kodi/userdata/addon_data/plugin.video.zdf_de_2016/tokenCache.txt'
17:45:08 T:2672939952  NOTICE: ZDF Mediathek 2016 [9]: [PlayVideo] - Timer - parsing url='https://api.zdf.de/content/documents/bares-fuer-rares-vom-2-januar-2018-100.json?profile=player' ...
17:45:08 T:2672939952  NOTICE: ZDF Mediathek 2016 [9]: [VideoContentResource] - Timer - loading url='https://api.zdf.de/content/documents/bares-fuer-rares-vom-2-januar-2018-100.json?profile=player' ...
17:45:08 T:2672939952   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/odroid/.kodi/addons/plugin.video.zdf_de_2016/addon.py", line 169, in <module>
                                                pagelet.service(request, response)
                                              File "/home/odroid/.kodi/addons/plugin.video.zdf_de_2016/de/generia/kodi/plugin/frontend/zdf/player/PlayVideo.py", line 47, in service
                                                videoContent = self._getVideoContent(videoContentUrl)
                                              File "/home/odroid/.kodi/addons/plugin.video.zdf_de_2016/de/generia/kodi/plugin/frontend/zdf/player/PlayVideo.py", line 131, in _getVideoContent
                                                self._parse(videoContent)
                                              File "/home/odroid/.kodi/addons/plugin.video.zdf_de_2016/de/generia/kodi/plugin/frontend/base/Pagelet.py", line 122, in _parse
                                                resource.parse()
                                              File "/home/odroid/.kodi/addons/plugin.video.zdf_de_2016/de/generia/kodi/plugin/backend/zdf/api/VideoContentResource.py", line 11, in parse
                                                super(VideoContentResource, self).parse()
                                              File "/home/odroid/.kodi/addons/plugin.video.zdf_de_2016/de/generia/kodi/plugin/backend/web/JsonResource.py", line 17, in parse
                                                super(JsonResource, self).parse()
                                              File "/home/odroid/.kodi/addons/plugin.video.zdf_de_2016/de/generia/kodi/plugin/backend/web/Resource.py", line 21, in parse
                                                self.content = self._getUrl();
                                              File "/home/odroid/.kodi/addons/plugin.video.zdf_de_2016/de/generia/kodi/plugin/backend/web/Resource.py", line 35, in _getUrl
                                                response = urllib2.urlopen(request, context=ssl._create_unverified_context())
                                              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 437, in open
                                                response = meth(req, response)
                                              File "/usr/lib/python2.7/urllib2.py", line 550, in http_response
                                                'http', request, response, code, msg, hdrs)
                                              File "/usr/lib/python2.7/urllib2.py", line 475, in error
                                                return self._call_chain(*args)
                                              File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
                                                result = func(*args)
                                              File "/usr/lib/python2.7/urllib2.py", line 558, 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<--
17:45:08 T:3007574016   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.zdf_de_2016/?pagelet=PlayVideo&genre=Show+%7C+Bares+f%C3%BCr+Rares&contentName=bares-fuer-rares-vom-2-januar-2018-100&videoUrl=%2Fshow%2Fbares-fuer-rares%2Fbares-fuer-rares-vom-2-januar-2018-100.html&title=%28%3E%29+Bares+f%C3%BCr+Rares+vom+2.+Januar+2018]

@generia
Copy link
Owner

generia commented Jan 11, 2018

best for 2018 as well and thanks for the message. I will check this ...

@generia
Copy link
Owner

generia commented Jan 11, 2018

there was a change in the way how json resources can be accessed on api.zdf.de. This is fixed with commit cb9fda1 and will setup a pull-request for kodi repo.

@generia
Copy link
Owner

generia commented Jan 11, 2018

the pull request is out. set to closed.

@generia generia closed this as completed Jan 11, 2018
@Itja
Copy link
Author

Itja commented Jan 13, 2018

Wow. Works like a charm. Thanks a lot for that quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants