1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-29 13:42:37 +00:00

Call extracted property age_limit everywhere

This commit is contained in:
Philipp Hagemeister 2013-10-06 16:23:06 +02:00
parent 8dbe9899a9
commit cfadd183c4
4 changed files with 4 additions and 4 deletions

View file

@ -313,7 +313,7 @@ class YoutubeDL(object):
return u'[download] %s upload date is not in range %s' % (date_from_str(date).isoformat(), dateRange) return u'[download] %s upload date is not in range %s' % (date_from_str(date).isoformat(), dateRange)
age_limit = self.params.get('age_limit') age_limit = self.params.get('age_limit')
if age_limit is not None: 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 u'Skipping "' + title + '" because it is age restricted'
return None return None

View file

@ -47,6 +47,6 @@ class PornotubeIE(InfoExtractor):
'title': video_title, 'title': video_title,
'ext': 'flv', 'ext': 'flv',
'format': 'flv', 'format': 'flv',
'age_restriction': age_limit} 'age_limit': age_limit}
return [info] return [info]

View file

@ -117,7 +117,7 @@ class YouPornIE(InfoExtractor):
'format': format, 'format': format,
'thumbnail': thumbnail, 'thumbnail': thumbnail,
'description': video_description, 'description': video_description,
'age_restriction': age_limit, 'age_limit': age_limit,
}) })
if self._downloader.params.get('listformats', None): if self._downloader.params.get('listformats', None):

View file

@ -1496,7 +1496,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
'player_url': player_url, 'player_url': player_url,
'subtitles': video_subtitles, 'subtitles': video_subtitles,
'duration': video_duration, 'duration': video_duration,
'age_restriction': 18 if age_gate else 0, 'age_limit': 18 if age_gate else 0,
}) })
return results return results