]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Call extracted property age_limit everywhere
authorPhilipp Hagemeister <phihag@phihag.de>
Sun, 6 Oct 2013 14:23:06 +0000 (16:23 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Sun, 6 Oct 2013 14:23:06 +0000 (16:23 +0200)
youtube_dl/YoutubeDL.py
youtube_dl/extractor/pornotube.py
youtube_dl/extractor/youporn.py
youtube_dl/extractor/youtube.py

index 6258c141e4206756f72824f5d6d59f074acfa41e..9ada01bcc64ad00520c33d8fa86329197711db0d 100644 (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)
         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
         
index 9039dff5a5bee13712dce0a39540c51aa052baa8..5d770ec285c3d1e3dcad04cfe49ca7780a9dd2b4 100644 (file)
@@ -47,6 +47,6 @@ class PornotubeIE(InfoExtractor):
                 'title': video_title,
                 'ext': 'flv',
                 'format': 'flv',
-                'age_restriction': age_limit}
+                'age_limit': age_limit}
 
         return [info]
index e2860ec9d6dcb643819f42ade62384d23086d2a1..b1f93dd1bb90d964916394d88d83aaaf153ba15b 100644 (file)
@@ -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):
index 9bcd035bde1fabe9c74dae03173a7cb0684486ca..b02ae25727f2843be3952670e8eba617ff23b749 100644 (file)
@@ -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