diff options
author | Stefano <l.stickell@yahoo.it> | 2013-07-21 15:03:21 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-07-21 15:03:21 +0200 |
commit | 4b61d36bf18931df0a9720047b3619ce245f8a1b (patch) | |
tree | fa6214ca6c85eb547dfe7de1ec7502ff3ce71793 /module/plugins/crypter/DownloadVimeoCom.py | |
parent | Normalize line endings to avoid line endings merge conflicts (diff) | |
download | pyload-4b61d36bf18931df0a9720047b3619ce245f8a1b.tar.xz |
Fixed PEP 8 violations in Crypters
Diffstat (limited to 'module/plugins/crypter/DownloadVimeoCom.py')
-rw-r--r-- | module/plugins/crypter/DownloadVimeoCom.py | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/module/plugins/crypter/DownloadVimeoCom.py b/module/plugins/crypter/DownloadVimeoCom.py index 88310915b..562672599 100644 --- a/module/plugins/crypter/DownloadVimeoCom.py +++ b/module/plugins/crypter/DownloadVimeoCom.py @@ -5,26 +5,27 @@ import re import HTMLParser from module.plugins.Crypter import Crypter + class DownloadVimeoCom(Crypter): - __name__ = 'DownloadVimeoCom' - __type__ = 'crypter' - __pattern__ = r'(?:http://vimeo\.com/\d*|http://smotri\.com/video/view/\?id=.*)' - ## The download from dailymotion failed with a 403 - __version__ = '0.1' - __description__ = """Video Download Plugin based on downloadvimeo.com""" - __author_name__ = ('4Christopher') - __author_mail__ = ('4Christopher@gmx.de') - BASE_URL = 'http://downloadvimeo.com' + __name__ = 'DownloadVimeoCom' + __type__ = 'crypter' + __pattern__ = r'(?:http://vimeo\.com/\d*|http://smotri\.com/video/view/\?id=.*)' + ## The download from dailymotion failed with a 403 + __version__ = '0.1' + __description__ = """Video Download Plugin based on downloadvimeo.com""" + __author_name__ = ('4Christopher') + __author_mail__ = ('4Christopher@gmx.de') + BASE_URL = 'http://downloadvimeo.com' - def decrypt(self, pyfile): - self.package = pyfile.package() - html = self.load('%s/generate?url=%s' % (self.BASE_URL, pyfile.url)) - h = HTMLParser.HTMLParser() - try: - f = re.search(r'cmd quality="(?P<quality>[^"]+?)">\s*?(?P<URL>[^<]*?)</cmd>', html) - except: - self.logDebug('Failed to find the URL') - else: - url = h.unescape(f.group('URL')) - self.logDebug('Quality: %s, URL: %s' % (f.group('quality'), url)) - self.packages.append((self.package.name, [url], self.package.folder)) + def decrypt(self, pyfile): + self.package = pyfile.package() + html = self.load('%s/generate?url=%s' % (self.BASE_URL, pyfile.url)) + h = HTMLParser.HTMLParser() + try: + f = re.search(r'cmd quality="(?P<quality>[^"]+?)">\s*?(?P<URL>[^<]*?)</cmd>', html) + except: + self.logDebug('Failed to find the URL') + else: + url = h.unescape(f.group('URL')) + self.logDebug('Quality: %s, URL: %s' % (f.group('quality'), url)) + self.packages.append((self.package.name, [url], self.package.folder)) |