|
|
|
@ -95,10 +95,15 @@ class NPOIE(InfoExtractor):
|
|
|
|
|
|
|
|
|
|
token = self._get_token(product_id)
|
|
|
|
|
|
|
|
|
|
formats = []
|
|
|
|
|
for profile in (
|
|
|
|
|
'dash',
|
|
|
|
|
# 'hls', # TODO test what needs to change for 'hls' support
|
|
|
|
|
):
|
|
|
|
|
stream_link = self._download_json(
|
|
|
|
|
'https://prod.npoplayer.nl/stream-link', video_id=slug,
|
|
|
|
|
data=json.dumps({
|
|
|
|
|
'profileName': 'dash',
|
|
|
|
|
'profileName': profile,
|
|
|
|
|
'drmType': 'widevine',
|
|
|
|
|
'referrerUrl': url,
|
|
|
|
|
}).encode('utf8'),
|
|
|
|
@ -107,14 +112,12 @@ class NPOIE(InfoExtractor):
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# TODO other formats than dash / mpd
|
|
|
|
|
stream_url = stream_link.get('stream', {}).get('streamURL')
|
|
|
|
|
mpd = self._extract_mpd_formats(stream_url, slug, mpd_id='dash', fatal=False)
|
|
|
|
|
formats.extend(self._extract_mpd_formats(stream_url, slug, mpd_id='dash', fatal=False))
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
'id': slug,
|
|
|
|
|
'formats': mpd,
|
|
|
|
|
'formats': formats,
|
|
|
|
|
'title': title or slug,
|
|
|
|
|
'description': description,
|
|
|
|
|
'thumbnail': thumbnail,
|
|
|
|
|