1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-28 21:22:13 +00:00

[nrk] Fix age limit extraction

This commit is contained in:
Sergey M․ 2021-01-03 06:51:21 +07:00
parent cabfd4b1f0
commit a25d03d7cb
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -204,6 +204,9 @@ class NRKIE(NRKBaseIE):
'height': int_or_none(image.get('pixelHeight')), 'height': int_or_none(image.get('pixelHeight')),
}) })
age_limit = int_or_none(try_get(
data, lambda x: x['legalAge']['body']['rating']['code']))
return { return {
'id': video_id, 'id': video_id,
'title': title, 'title': title,
@ -211,6 +214,7 @@ class NRKIE(NRKBaseIE):
'description': description, 'description': description,
'duration': duration, 'duration': duration,
'thumbnails': thumbnails, 'thumbnails': thumbnails,
'age_limit': age_limit,
'formats': formats, 'formats': formats,
} }