Style fixes for extractors: remove spaces around (,),{ and }
[youtube-dl] / youtube_dl / extractor / spankwire.py
index f0d5009c717be0cd02ea7edf2b74af0a7a8e8b80..97f9c268a4531114912f9209c8a959d567add062 100644 (file)
@@ -22,6 +22,7 @@ class SpankwireIE(InfoExtractor):
             u"uploader": u"oreusz", 
             u"title": u"Buckcherry`s X Rated Music Video Crazy Bitch",
             u"description": u"Crazy Bitch X rated music video.",
+            u"age_limit": 18,
         }
     }
 
@@ -48,10 +49,10 @@ class SpankwireIE(InfoExtractor):
 
         formats = []
         for video_url in video_urls:
-            path = compat_urllib_parse_urlparse( video_url ).path
-            extension = os.path.splitext( path )[1][1:]
+            path = compat_urllib_parse_urlparse(video_url).path
+            extension = os.path.splitext(path)[1][1:]
             format = path.split('/')[4].split('_')[:2]
-            format = "-".join( format )
+            format = "-".join(format)
             formats.append({
                 'url': video_url,
                 'ext': extension,
@@ -60,6 +61,8 @@ class SpankwireIE(InfoExtractor):
             })
         formats.sort(key=lambda format: list(map(lambda s: s.zfill(6), format['format'].split('-'))))
 
+        age_limit = self._rta_search(webpage)
+
         return {
             'id': video_id,
             'uploader': video_uploader,
@@ -67,4 +70,5 @@ class SpankwireIE(InfoExtractor):
             'thumbnail': thumbnail,
             'description': description,
             'formats': formats,
+            'age_limit': age_limit,
         }