mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-15 18:34:22 +00:00
[nrk] fix extraction for videos without a legalAge rating
This commit is contained in:
parent
745db8899d
commit
8a3797a4ab
@ -223,12 +223,12 @@ class NRKIE(NRKBaseIE):
|
|||||||
legal_age = try_get(
|
legal_age = try_get(
|
||||||
data, lambda x: x['legalAge']['body']['rating']['code'], compat_str)
|
data, lambda x: x['legalAge']['body']['rating']['code'], compat_str)
|
||||||
# https://en.wikipedia.org/wiki/Norwegian_Media_Authority
|
# https://en.wikipedia.org/wiki/Norwegian_Media_Authority
|
||||||
if legal_age == 'A':
|
age_limit = None
|
||||||
age_limit = 0
|
if legal_age:
|
||||||
elif legal_age.isdigit():
|
if legal_age == 'A':
|
||||||
age_limit = int_or_none(legal_age)
|
age_limit = 0
|
||||||
else:
|
elif legal_age.isdigit():
|
||||||
age_limit = None
|
age_limit = int_or_none(legal_age)
|
||||||
|
|
||||||
is_series = try_get(data, lambda x: x['_links']['series']['name']) == 'series'
|
is_series = try_get(data, lambda x: x['_links']['series']['name']) == 'series'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user