[nrk] Fix age limit extraction

pull/27650/head
Sergey M․ 3 years ago
parent cabfd4b1f0
commit a25d03d7cb
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

@ -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,
}

Loading…
Cancel
Save