aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlf Marius <fractalf@users.noreply.github.com>2021-10-23 00:52:01 +0200
committerGitHub <noreply@github.com>2021-10-23 04:22:01 +0530
commit93c7f3398dd2e45fdb2c32b49ff169c46eadfbda (patch)
tree06d0c3ac7ddbc91266c76283719926009f0541b3
parent1117579b9457f8fbf7a4d7433a92b67ac802bdea (diff)
downloadhypervideo-pre-93c7f3398dd2e45fdb2c32b49ff169c46eadfbda.tar.lz
hypervideo-pre-93c7f3398dd2e45fdb2c32b49ff169c46eadfbda.tar.xz
hypervideo-pre-93c7f3398dd2e45fdb2c32b49ff169c46eadfbda.zip
[Nrk] See desc (#1382)
* Endpoint has changed. Currently the old one redirects to the new one, but this may change * Descriptions use \r instead of \n. So translate it Authored by: fractalf
-rw-r--r--yt_dlp/extractor/nrk.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/extractor/nrk.py b/yt_dlp/extractor/nrk.py
index b556bc6aa..49d58a685 100644
--- a/yt_dlp/extractor/nrk.py
+++ b/yt_dlp/extractor/nrk.py
@@ -147,7 +147,7 @@ class NRKIE(NRKBaseIE):
def _real_extract(self, url):
video_id = self._match_id(url).split('/')[-1]
- path_templ = 'playback/%s/' + video_id
+ path_templ = 'playback/%s/program/' + video_id
def call_playback_api(item, query=None):
return self._call_api(path_templ % item, video_id, item, query=query)
@@ -188,7 +188,7 @@ class NRKIE(NRKBaseIE):
title = titles['title']
alt_title = titles.get('subtitle')
- description = preplay.get('description')
+ description = try_get(preplay, lambda x: x['description'].replace('\r', '\n'))
duration = parse_duration(playable.get('duration')) or parse_duration(data.get('duration'))
thumbnails = []