question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

plugin for npo.nl stoppped working.

See original GitHub issue

Checklist

  • This is a bug report.
  • This is a plugin request.
  • This is a feature request.
  • I used the search function to find already opened/closed issues or pull requests.

Description

Trying to play any url at npo.nl/live results in an error.

Expected / Actual behavior

expecting a stream, error is:

[cli][info] Found matching plugin npo for URL npo.nl/live/npo-1
error: Unable to open URL: http://ida.omroep.nl/npoplayer/i.js?s=http%3A//npo.nl/live/npo-1 (410 Client Error: Gone for url: http://ida.omroep.nl/npoplayer/i.js?s=http%3A//npo.nl/live/npo-1)

Reproduction steps / Stream URLs to test

streamlink -l debug npo.nl/live/npo-1

Environment details (operating system, python version, etc.)

Multiple systems, all using streamlink 0.3.2, Python 2.7.12

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
beardypigcommented, Mar 1, 2017

Cool. tvcatchup.py is a pretty basic plugin.

To make a Plugin you have to subclass Plugin and set the module level variable __plugin__ to that class (__plugin__ = TVCatchup). Then you have to implement the two required methods, can_handle_url (a classmethod) and _get_streams.

can_handle_url is super simple, you just return True/False if this plugin can handle the supplied URL. Normally this is done wit a regex, (r"http://(?:www\.)?tvcatchup.com/watch/\w+").

_get_streams is also pretty simple, you have either return a list, iterable, or dict containing the streams. The dict must have the quality name (eg. 540p) as the key and an instance of Stream as the value, likewise with the list/iterable it must be a tuple of (quality, stream). There are a number of different Stream classes in the stream module. The most common one now is probably HLSStream (as in tvcatchup). There is a special global http which is a requests.Session instance (with some extra methods for json/xml), which has been set up with the users preferences, you should use this to do all http requests. You can see in the tvcatchup plugin, the page (self.url) is requested and an m3u8 URL is searched for, if it is found then it is parsed with HLSStream.parse_variant_playlist if the URL contains _adp. HLSStream.parse_variant_playlist returns a properly formatted dict with all the streams. In the other case (_adp not in the URL) it assumes it’s 576p and returns a dict with one HLSStream instance.

If you fire up a python shell and do

import streamlink
streamlink.streams("http://tvcatchup.com/watch/bbcone")

you will see what the plugin returns 😃 In this case the quality keys are in bitrate (550k, etc). Streamlink sorts the qualities returned by the Plugin (see stream_weight to see how the weights are compared).

To write your own plugin you need to work out how the site works, and how it gets it stream urls (m3u8/f4m/etc.). Then it’s just a case of getting your Plugin to replicate it 😃

1reaction
beardypigcommented, Mar 1, 2017

I have created a PR with an updated version of the plugin, would be good if you could test it out @sophof 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

NPO Channels not working · Issue #1547 · retrospect-addon ...
Just use the InputStream Adaptive Helper add-on (Installed with Retrospect) to force update of WideVine. The reboot your device.
Read more >
Dutch NPO streams as channels in Kodi? - Tvheadend
I like to have the free dutch NPO [123] streams be handled as "normal" channels (they should ... @Bengt: is not working for...
Read more >
Troubleshooting | Rieter.NET - Retrospect
If things are really not working and you want to start from scratch please follow these steps: Delete the /addons/plugin.video.retrospect/ folder from your ......
Read more >
How to Fix Common Podcast RSS Feed Problems
It seems the problem is you're using PodPress (very old and not well maintained) _and_ redirecting to FeedBurner and possibly using FeedBurner's broken ......
Read more >
Plugins - FlexGet
Note: This plugin does not currently work, look into imdb_watchlist ... npo_watchlist, Create entries for the shows and episodes in your npo.nl account ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found