aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/nrk.py
diff options
context:
space:
mode:
authorHa Tien Loi <loiht.b17vt220@stu.ptit.edu.vn>2022-04-07 22:52:27 +0700
committerGitHub <noreply@github.com>2022-04-07 08:52:27 -0700
commitab0970b233333632a26f9b2675045ef628f62ce8 (patch)
tree9e848137504ecc471bac8179f6c555e169bc40b4 /yt_dlp/extractor/nrk.py
parentb52e788eb2ba9914aa812238365dcb3348be2944 (diff)
downloadhypervideo-pre-ab0970b233333632a26f9b2675045ef628f62ce8.tar.lz
hypervideo-pre-ab0970b233333632a26f9b2675045ef628f62ce8.tar.xz
hypervideo-pre-ab0970b233333632a26f9b2675045ef628f62ce8.zip
[NRK] Extract timestamp (#3231)
Closes #3211 Authored by: hatienl0i261299
Diffstat (limited to 'yt_dlp/extractor/nrk.py')
-rw-r--r--yt_dlp/extractor/nrk.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/extractor/nrk.py b/yt_dlp/extractor/nrk.py
index 4d723e886..0cf26d598 100644
--- a/yt_dlp/extractor/nrk.py
+++ b/yt_dlp/extractor/nrk.py
@@ -13,6 +13,7 @@ from ..utils import (
ExtractorError,
int_or_none,
parse_duration,
+ parse_iso8601,
str_or_none,
try_get,
urljoin,
@@ -247,6 +248,7 @@ class NRKIE(NRKBaseIE):
'age_limit': age_limit,
'formats': formats,
'subtitles': subtitles,
+ 'timestamp': parse_iso8601(try_get(manifest, lambda x: x['availability']['onDemand']['from'], str))
}
if is_series:
@@ -797,7 +799,7 @@ class NRKPlaylistBaseIE(InfoExtractor):
for video_id in re.findall(self._ITEM_RE, webpage)
]
- playlist_title = self. _extract_title(webpage)
+ playlist_title = self._extract_title(webpage)
playlist_description = self._extract_description(webpage)
return self.playlist_result(