mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-01-07 17:16:08 +00:00
[nrk] Improve video id extraction
This commit is contained in:
parent
1f1d01d498
commit
7b643d4cd0
|
@ -151,6 +151,8 @@ class NRKIE(NRKBaseIE):
|
|||
# known values for preferredCdn: akamai, iponly, minicdn and telenor
|
||||
manifest = call_playback_api('manifest', {'preferredCdn': 'akamai'})
|
||||
|
||||
video_id = try_get(manifest, lambda x: x['id'], compat_str) or video_id
|
||||
|
||||
if manifest.get('playability') == 'nonPlayable':
|
||||
self._raise_error(manifest['nonPlayable'])
|
||||
|
||||
|
@ -211,7 +213,7 @@ class NRKIE(NRKBaseIE):
|
|||
}
|
||||
|
||||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
video_id = self._match_id(url).split('/')[-1]
|
||||
return self._extract_from_playback(video_id)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue