Style fixes for extractors: remove spaces around (,),{ and }
[youtube-dl] / youtube_dl / extractor / tube8.py
index ef8d216421826d2b2b2ec205f7e058e0c78703d0..d4b7603c7c96a5da148ff50869559b0ff0c11a0f 100644 (file)
@@ -22,6 +22,7 @@ class Tube8IE(InfoExtractor):
             u"description": u"hot teen Kasia grinding", 
             u"uploader": u"unknown", 
             u"title": u"Kasia music video",
+            u"age_limit": 18,
         }
     }
 
@@ -36,7 +37,7 @@ class Tube8IE(InfoExtractor):
 
         video_title = self._html_search_regex(r'videotitle     ="([^"]+)', webpage, u'title')
         video_description = self._html_search_regex(r'>Description:</strong>(.+?)<', webpage, u'description', fatal=False)
-        video_uploader = self._html_search_regex(r'>Submitted by:</strong>(?:\w|<[^>]*>)*(.+?)<', webpage, u'uploader', fatal=False)
+        video_uploader = self._html_search_regex(r'>Submitted by:</strong>(?:\s|<[^>]*>)*(.+?)<', webpage, u'uploader', fatal=False)
         thumbnail = self._html_search_regex(r'"image_url":"([^"]+)', webpage, u'thumbnail', fatal=False)
         if thumbnail:
             thumbnail = thumbnail.replace('\\/', '/')
@@ -45,10 +46,10 @@ class Tube8IE(InfoExtractor):
         if webpage.find('"encrypted":true')!=-1:
             password = self._html_search_regex(r'"video_title":"([^"]+)', webpage, u'password')
             video_url = aes_decrypt_text(video_url, password, 32).decode('utf-8')
-        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)
 
         return {
             'id': video_id,
@@ -60,4 +61,5 @@ class Tube8IE(InfoExtractor):
             'ext': extension,
             'format': format,
             'format_id': format,
+            'age_limit': 18,
         }