aboutsummaryrefslogtreecommitdiff
path: root/youtube_dlc/extractor/nrk.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan@gmail.com>2021-01-08 21:44:50 +0530
committerpukkandan <pukkandan@gmail.com>2021-01-08 21:59:10 +0530
commit00dd0cd573c6ef8ca38dc73b88160b6c9f074dbe (patch)
tree7a7c1f5587556df9ccbb981eed745567dfba86a0 /youtube_dlc/extractor/nrk.py
parent0c0ff18f7d9087c8306a8ad8713aef409a7f63f8 (diff)
Update to ytdl-2021.01.08
Diffstat (limited to 'youtube_dlc/extractor/nrk.py')
-rw-r--r--youtube_dlc/extractor/nrk.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/youtube_dlc/extractor/nrk.py b/youtube_dlc/extractor/nrk.py
index 69178e157..40dee2162 100644
--- a/youtube_dlc/extractor/nrk.py
+++ b/youtube_dlc/extractor/nrk.py
@@ -223,12 +223,12 @@ class NRKIE(NRKBaseIE):
legal_age = try_get(
data, lambda x: x['legalAge']['body']['rating']['code'], compat_str)
# https://en.wikipedia.org/wiki/Norwegian_Media_Authority
- if legal_age == 'A':
- age_limit = 0
- elif legal_age.isdigit():
- age_limit = int_or_none(legal_age)
- else:
- age_limit = None
+ age_limit = None
+ if legal_age:
+ if legal_age == 'A':
+ age_limit = 0
+ elif legal_age.isdigit():
+ age_limit = int_or_none(legal_age)
is_series = try_get(data, lambda x: x['_links']['series']['name']) == 'series'
@@ -298,6 +298,14 @@ class NRKTVIE(InfoExtractor):
'description': 'md5:46923a6e6510eefcce23d5ef2a58f2ce',
'duration': 2223.44,
'age_limit': 6,
+ 'subtitles': {
+ 'nb-nor': [{
+ 'ext': 'vtt',
+ }],
+ 'nb-ttv': [{
+ 'ext': 'vtt',
+ }]
+ },
},
}, {
'url': 'https://tv.nrk.no/serie/20-spoersmaal-tv/MUHH48000314/23-05-2014',