From cfadd183c4a281e97fba89501d59ee344bcc5978 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Sun, 6 Oct 2013 16:23:06 +0200 Subject: [PATCH] Call extracted property age_limit everywhere --- youtube_dl/YoutubeDL.py | 2 +- youtube_dl/extractor/pornotube.py | 2 +- youtube_dl/extractor/youporn.py | 2 +- youtube_dl/extractor/youtube.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 6258c141e..9ada01bcc 100644 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -313,7 +313,7 @@ class YoutubeDL(object): return u'[download] %s upload date is not in range %s' % (date_from_str(date).isoformat(), dateRange) age_limit = self.params.get('age_limit') if age_limit is not None: - if age_limit < info_dict.get('age_restriction', 0): + if age_limit < info_dict.get('age_limit', 0): return u'Skipping "' + title + '" because it is age restricted' return None diff --git a/youtube_dl/extractor/pornotube.py b/youtube_dl/extractor/pornotube.py index 9039dff5a..5d770ec28 100644 --- a/youtube_dl/extractor/pornotube.py +++ b/youtube_dl/extractor/pornotube.py @@ -47,6 +47,6 @@ class PornotubeIE(InfoExtractor): 'title': video_title, 'ext': 'flv', 'format': 'flv', - 'age_restriction': age_limit} + 'age_limit': age_limit} return [info] diff --git a/youtube_dl/extractor/youporn.py b/youtube_dl/extractor/youporn.py index e2860ec9d..b1f93dd1b 100644 --- a/youtube_dl/extractor/youporn.py +++ b/youtube_dl/extractor/youporn.py @@ -117,7 +117,7 @@ class YouPornIE(InfoExtractor): 'format': format, 'thumbnail': thumbnail, 'description': video_description, - 'age_restriction': age_limit, + 'age_limit': age_limit, }) if self._downloader.params.get('listformats', None): diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 9bcd035bd..b02ae2572 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1496,7 +1496,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor): 'player_url': player_url, 'subtitles': video_subtitles, 'duration': video_duration, - 'age_restriction': 18 if age_gate else 0, + 'age_limit': 18 if age_gate else 0, }) return results