projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cabfd4b
)
[nrk] Fix age limit extraction
author
Sergey M․
<dstftw@gmail.com>
Sat, 2 Jan 2021 23:51:21 +0000
(06:51 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 2 Jan 2021 23:51:21 +0000
(06:51 +0700)
youtube_dl/extractor/nrk.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/nrk.py
b/youtube_dl/extractor/nrk.py
index 520206534bc5990efbdd2a876124d73e5479ce13..d023de7f77330ab1c594901b27aa095c7205aa5a 100644
(file)
--- a/
youtube_dl/extractor/nrk.py
+++ b/
youtube_dl/extractor/nrk.py
@@
-204,6
+204,9
@@
class NRKIE(NRKBaseIE):
'height': int_or_none(image.get('pixelHeight')),
})
+ age_limit = int_or_none(try_get(
+ data, lambda x: x['legalAge']['body']['rating']['code']))
+
return {
'id': video_id,
'title': title,
@@
-211,6
+214,7
@@
class NRKIE(NRKBaseIE):
'description': description,
'duration': duration,
'thumbnails': thumbnails,
+ 'age_limit': age_limit,
'formats': formats,
}