chrippa / livestreamer

Command-line utility that extracts streams from various services and pipes them into a video player of choice. No longer maintained, use streamlink or youtube-dl instead.
http://livestreamer.io/
BSD 2-Clause "Simplified" License
3.88k stars 582 forks source link

npo.py plugin not working well 6 of 7 failed #1418

Open Meindert66 opened 8 years ago

Meindert66 commented 8 years ago

When try to show npo 1,2 or 3 the most of the times it fails. Could be a authentication thing ? The Nederland24.py plugin in kodi works well, could be the source to fix the problem in livestreamer plugin npo.py

meindert@i3:~$ /usr/bin/livestreamer www.npo.nl/live/npo-1 best [cli][info] Found matching plugin npo for URL www.npo.nl/live/npo-1 Traceback (most recent call last): File "/usr/bin/livestreamer", line 9, in load_entry_point('livestreamer==1.12.2', 'console_scripts', 'livestreamer')() File "/usr/share/livestreamer/livestreamer_cli/main.py", line 886, in main handle_url() File "/usr/share/livestreamer/livestreamer_cli/main.py", line 471, in handle_url streams = fetch_streams(plugin) File "/usr/share/livestreamer/livestreamer_cli/main.py", line 388, in fetch_streams sorting_excludes=args.stream_sorting_excludes) File "/usr/lib/python2.7/dist-packages/livestreamer/plugin/plugin.py", line 313, in get_streams return self.streams(_args, *_kwargs) File "/usr/lib/python2.7/dist-packages/livestreamer/plugin/plugin.py", line 227, in streams ostreams = self._get_streams() File "/usr/lib/python2.7/dist-packages/livestreamer/plugins/npo.py", line 60, in _get_streams return self._get_live_streams() File "/usr/lib/python2.7/dist-packages/livestreamer/plugins/npo.py", line 50, in _get_live_streams deeplink = http.get(streamdata['stream'], headers=HTTP_HEADERS).content KeyError: 'stream'

ghost commented 8 years ago

Seems to work fine here. I have tested all 3 channels (NPO 1 / NPO 2 / NPO 3) one after the other. No clue why you are getting this error message.

livestreamer "http://www.npo.nl/live/npo-1" best
[cli][info] Found matching plugin npo for URL http://www.npo.nl/live/npo-1
[cli][info] Available streams: 216p (worst), 270p, 360p, 432p, 576p (best)
[cli][info] Opening stream: 576p (hls)
livestreamer "http://www.npo.nl/live/npo-2" best
[cli][info] Found matching plugin npo for URL http://www.npo.nl/live/npo-2
[cli][info] Available streams: 216p (worst), 270p, 360p, 432p, 576p (best)
[cli][info] Opening stream: 576p (hls)
livestreamer "http://www.npo.nl/live/npo-3" best
[cli][info] Found matching plugin npo for URL http://www.npo.nl/live/npo-3
[cli][info] Available streams: 216p (worst), 270p, 360p, 432p, 576p (best)
[cli][info] Opening stream: 576p (hls)
Meindert66 commented 8 years ago

I will try the development branch of livestreamer in the near future. The debian package I use is version 1.12.2. Just replacing the npo.py plugin did not resolve the problem. Howto install the livestreamer development branch in /usr/local ?

LeonB commented 8 years ago

Pull request #1013 fixes this issue. Installing livestreamer from head works with npo: pip install git+https://github.com/chrippa/livestreamer.git