aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/generic.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2020-12-19 23:24:52 +0700
committerSergey M․ <dstftw@gmail.com>2020-12-19 23:24:52 +0700
commit3729c52f9dd93773f47bab84ccb73de7917b0d7e (patch)
tree489cbe1cdb1c6ded9894cade0d702c1dc0481081 /youtube_dl/extractor/generic.py
parent71679eaee857d9dfcf1fdc4b5016abfc1fe8bc45 (diff)
[generic] Improve RSS age limit extraction
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r--youtube_dl/extractor/generic.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index ab24572e4..711adf498 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -232,10 +232,13 @@ class GenericIE(InfoExtractor):
'id': 'c1c879525ce2cb640b344507e682c36d',
'title': 're:Hydrogen!',
'description': 're:.*In this episode we are going.*',
- 'timestamp': int,
+ 'timestamp': 1567977776,
'upload_date': '20190908',
- 'duration': int,
+ 'duration': 459,
'thumbnail': r're:^https?://.*\.jpg$',
+ 'episode_number': 1,
+ 'season_number': 1,
+ 'age_limit': 0,
},
}],
'params': {
@@ -2243,10 +2246,10 @@ class GenericIE(InfoExtractor):
default=None)
duration = itunes('duration')
- explicit = itunes('explicit')
- if explicit == 'true':
+ explicit = (itunes('explicit') or '').lower()
+ if explicit in ('true', 'yes'):
age_limit = 18
- elif explicit == 'false':
+ elif explicit in ('false', 'no'):
age_limit = 0
else:
age_limit = None