]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Style fixes for extractors: remove spaces around (,),{ and }
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 3 Nov 2013 13:03:17 +0000 (14:03 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 3 Nov 2013 13:06:47 +0000 (14:06 +0100)
13 files changed:
youtube_dl/extractor/depositfiles.py
youtube_dl/extractor/extremetube.py
youtube_dl/extractor/hypem.py
youtube_dl/extractor/keezmovies.py
youtube_dl/extractor/mofosex.py
youtube_dl/extractor/pornhub.py
youtube_dl/extractor/spankwire.py
youtube_dl/extractor/tube8.py
youtube_dl/extractor/vimeo.py
youtube_dl/extractor/xtube.py
youtube_dl/extractor/yahoo.py
youtube_dl/extractor/youku.py
youtube_dl/extractor/youporn.py

index d43348955f122edf17573660077dca407634e329..2c9fb5f2e08dd69e977ab5dc599d97a5ff26a917 100644 (file)
@@ -25,7 +25,7 @@ class DepositFilesIE(InfoExtractor):
         url = 'http://depositfiles.com/en/files/' + file_id
 
         # Retrieve file webpage with 'Free download' button pressed
-        free_download_indication = { 'gateway_result' : '1' }
+        free_download_indication = {'gateway_result' : '1'}
         request = compat_urllib_request.Request(url, compat_urllib_parse.urlencode(free_download_indication))
         try:
             self.report_download_webpage(file_id)
index 0f1eec40f86de4a7ac52507f77398b7d20039de2..1c20e43644b917d5b73b712d1630740f1a7e7e81 100644 (file)
@@ -33,10 +33,10 @@ class ExtremeTubeIE(InfoExtractor):
         video_title = self._html_search_regex(r'<h1 [^>]*?title="([^"]+)"[^>]*>\1<', webpage, u'title')
         uploader = self._html_search_regex(r'>Posted by:(?=<)(?:\s|<[^>]*>)*(.+?)\|', webpage, u'uploader', fatal=False)
         video_url = compat_urllib_parse.unquote(self._html_search_regex(r'video_url=(.+?)&amp;', webpage, u'video_url'))
-        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('/')[5].split('_')[:2]
-        format = "-".join( format )
+        format = "-".join(format)
 
         return {
             'id': video_id,
index ab2b591036a6371fc31e7437c368858dfb708efa..9bd06e7c7913e9c7492f63417760012f1219c875 100644 (file)
@@ -30,7 +30,7 @@ class HypemIE(InfoExtractor):
             raise ExtractorError(u'Invalid URL: %s' % url)
         track_id = mobj.group(1)
 
-        data = { 'ax': 1, 'ts': time.time() }
+        data = {'ax': 1, 'ts': time.time()}
         data_encoded = compat_urllib_parse.urlencode(data)
         complete_url = url + "?" + data_encoded
         request = compat_urllib_request.Request(complete_url)
@@ -68,4 +68,4 @@ class HypemIE(InfoExtractor):
             'ext':      "mp3",
             'title':    title,
             'artist':   artist,
-        }]
\ No newline at end of file
+        }]
index 7869244452ac4b8dab673ce82e29b6b737aa3bc2..29658a7d63c6396d33c370a35b07a4636d265d99 100644 (file)
@@ -43,10 +43,10 @@ class KeezMoviesIE(InfoExtractor):
         if webpage.find('encrypted=true')!=-1:
             password = self._html_search_regex(r'video_title=(.+?)&amp;', 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)
 
         age_limit = self._rta_search(webpage)
 
index a0c926cd12b924519abfa5070176c30b11702219..b9430b09b749ad8c1dba28e3db794ef435b5aac8 100644 (file)
@@ -31,10 +31,10 @@ class MofosexIE(InfoExtractor):
 
         video_title = self._html_search_regex(r'<h1>(.+?)<', webpage, u'title')
         video_url = compat_urllib_parse.unquote(self._html_search_regex(r'flashvars.video_url = \'([^\']+)', webpage, u'video_url'))
-        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('/')[5].split('_')[:2]
-        format = "-".join( format )
+        format = "-".join(format)
 
         age_limit = self._rta_search(webpage)
 
index 5e2454f1b79cc77f71964f609ea9dd53fd739fbc..75cf4bb9f6789157531377ed38ed100033e2393d 100644 (file)
@@ -47,10 +47,10 @@ class PornHubIE(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('/')[5].split('_')[:2]
-            format = "-".join( format )
+            format = "-".join(format)
             formats.append({
                 'url': video_url,
                 'ext': extension,
index 32df0a7fb5607fc254b5e964baa2bb9cbb8ee9cf..97f9c268a4531114912f9209c8a959d567add062 100644 (file)
@@ -49,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,
index aea9d9a24045cb92859c6b7737fad88baef057ff..d4b7603c7c96a5da148ff50869559b0ff0c11a0f 100644 (file)
@@ -46,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,
index 62273fd33814901ca3b3c799e0589e6c14985fc3..d465bf20b6d65b7b5cd3a0545af676c2c710a07d 100644 (file)
@@ -203,7 +203,7 @@ class VimeoIE(InfoExtractor):
         # Vimeo specific: extract video codec and quality information
         # First consider quality, then codecs, then take everything
         codecs = [('vp6', 'flv'), ('vp8', 'flv'), ('h264', 'mp4')]
-        files = { 'hd': [], 'sd': [], 'other': []}
+        files = {'hd': [], 'sd': [], 'other': []}
         config_files = config["video"].get("files") or config["request"].get("files")
         for codec_name, codec_extension in codecs:
             for quality in config_files.get(codec_name, []):
index 483fb0791247c10d02410ac9a6f1d2551e859cc0..03ad88bededd60a7d8462bb85e5a8cb23db381b2 100644 (file)
@@ -35,12 +35,12 @@ class XTubeIE(InfoExtractor):
         video_uploader = self._html_search_regex(r'so_s\.addVariable\("owner_u", "([^"]+)', webpage, u'uploader', fatal=False)
         video_description = self._html_search_regex(r'<p class="video_description">([^<]+)', webpage, u'description', default=None)
         video_url= self._html_search_regex(r'var videoMp4 = "([^"]+)', webpage, u'video_url').replace('\\/', '/')
-        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('/')[5].split('_')[:2]
         format[0] += 'p'
         format[1] += 'k'
-        format = "-".join( format )
+        format = "-".join(format)
 
         return {
             'id': video_id,
index 464b498f584c3e42b613a79589b52a4d32fec413..34e6afb20fb6833ab21501785deb54cf5f0a0e24 100644 (file)
@@ -132,7 +132,7 @@ class YahooSearchIE(SearchInfoExtractor):
                 mobj = re.search(r'(?P<url>screen\.yahoo\.com/.*?-\d*?\.html)"', r)
                 e = self.url_result('http://' + mobj.group('url'), 'Yahoo')
                 res['entries'].append(e)
-            if (pagenum * 30 +i >= n) or (m[u'last'] >= (m[u'total'] -1 )):
+            if (pagenum * 30 +i >= n) or (m[u'last'] >= (m[u'total'] -1)):
                 break
 
         return res
index 9d88c17f52a25091ea045d2ea0dd6f819da93473..a8fd40c833fb7707eb1cd8760c288da5f2299025 100644 (file)
@@ -18,7 +18,7 @@ class YoukuIE(InfoExtractor):
         u"url": u"http://v.youku.com/v_show/id_XNDgyMDQ2NTQw.html",
         u"file": u"XNDgyMDQ2NTQw_part00.flv",
         u"md5": u"ffe3f2e435663dc2d1eea34faeff5b5b",
-        u"params": { u"test": False },
+        u"params": {u"test": False},
         u"info_dict": {
             u"title": u"youtube-dl test video \"'/\\ä↭𝕐"
         }
@@ -37,8 +37,8 @@ class YoukuIE(InfoExtractor):
         source = list("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/\:._-1234567890")
         seed = float(seed)
         for i in range(len(source)):
-            seed  =  (seed * 211 + 30031 ) % 65536
-            index  =  math.floor(seed / 65536 * len(source) )
+            seed  =  (seed * 211 + 30031) % 65536
+            index  =  math.floor(seed / 65536 * len(source))
             mixed.append(source[int(index)])
             source.remove(source[int(index)])
         #return ''.join(mixed)
index e46a9b4d6ca33f5dd768c928aae0901677e7b2fc..bd0f2cae0298dec0d78f812153976ec6a8434bb0 100644 (file)
@@ -81,14 +81,14 @@ class YouPornIE(InfoExtractor):
             # http://cdn1.download.youporn.phncdn.com/201210/31/8004515/480p_370k_8004515/YouPorn%20-%20Nubile%20Films%20The%20Pillow%20Fight.mp4?nvb=20121113051249&nva=20121114051249&ir=1200&sr=1200&hash=014b882080310e95fb6a0
             # A path looks like this:
             # /201210/31/8004515/480p_370k_8004515/YouPorn%20-%20Nubile%20Films%20The%20Pillow%20Fight.mp4
-            video_url = unescapeHTML( link )
-            path = compat_urllib_parse_urlparse( video_url ).path
-            extension = os.path.splitext( path )[1][1:]
+            video_url = unescapeHTML(link)
+            path = compat_urllib_parse_urlparse(video_url).path
+            extension = os.path.splitext(path)[1][1:]
             format = path.split('/')[4].split('_')[:2]
 
             # size = format[0]
             # bitrate = format[1]
-            format = "-".join( format )
+            format = "-".join(format)
             # title = u'%s-%s-%s' % (video_title, size, bitrate)
 
             formats.append({