diff options
author | 2015-08-09 00:50:54 +0200 | |
---|---|---|
committer | 2015-08-09 00:50:54 +0200 | |
commit | b0ef3f1673e1930916604bb1264ca3a38414bc8d (patch) | |
tree | c97936e4d2a4cd6eb1072c65c8a08a7d18816b18 /module/plugins/hoster/VimeoCom.py | |
parent | [XFileSharingPro][XFileSharingProFolder] Added default __pattern__ (diff) | |
parent | Fix https://github.com/pyload/pyload/issues/1707 (diff) | |
download | pyload-b0ef3f1673e1930916604bb1264ca3a38414bc8d.tar.xz |
Merge pull request #1 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/hoster/VimeoCom.py')
-rw-r--r-- | module/plugins/hoster/VimeoCom.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/module/plugins/hoster/VimeoCom.py b/module/plugins/hoster/VimeoCom.py index a5196cb92..d47677c42 100644 --- a/module/plugins/hoster/VimeoCom.py +++ b/module/plugins/hoster/VimeoCom.py @@ -8,7 +8,8 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class VimeoCom(SimpleHoster): __name__ = "VimeoCom" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.06" + __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(player\.)?vimeo\.com/(video/)?(?P<ID>\d+)' __config__ = [("use_premium", "bool" , "Use premium account if available" , True ), @@ -20,7 +21,7 @@ class VimeoCom(SimpleHoster): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - NAME_PATTERN = r'<title>(?P<N>.+) on Vimeo<' + NAME_PATTERN = r'<title>(?P<N>.+?) on Vimeo<' OFFLINE_PATTERN = r'class="exception_header"' TEMP_OFFLINE_PATTERN = r'Please try again in a few minutes.<' @@ -30,16 +31,16 @@ class VimeoCom(SimpleHoster): def setup(self): - self.resumeDownload = True + self.resume_download = True self.multiDL = True - self.chunkLimit = -1 + self.chunk_limit = -1 - def handleFree(self, pyfile): - password = self.getPassword() + def handle_free(self, pyfile): + password = self.get_password() if self.js and 'class="btn iconify_down_b"' in self.html: - html = self.js.eval(self.load(pyfile.url, get={'action': "download", 'password': password}, decode=True)) + html = self.js.eval(self.load(pyfile.url, get={'action': "download", 'password': password})) pattern = r'href="(?P<URL>http://vimeo\.com.+?)".*?\>(?P<QL>.+?) ' else: html = self.load("https://player.vimeo.com/video/" + self.info['pattern']['ID'], get={'password': password}) @@ -47,14 +48,14 @@ class VimeoCom(SimpleHoster): link = dict((l.group('QL').lower(), l.group('URL')) for l in re.finditer(pattern, html)) - if self.getConfig('original'): + if self.get_config('original'): if "original" in link: self.link = link[q] return else: - self.logInfo(_("Original file not downloadable")) + self.log_info(_("Original file not downloadable")) - quality = self.getConfig('quality') + quality = self.get_config('quality') if quality == "Highest": qlevel = ("hd", "sd", "mobile") elif quality == "Lowest": @@ -67,7 +68,7 @@ class VimeoCom(SimpleHoster): self.link = link[q] return else: - self.logInfo(_("No %s quality video found") % q.upper()) + self.log_info(_("No %s quality video found") % q.upper()) else: self.fail(_("No video found!")) |