From 854efeb463bd98cb8e22f1f78f5ce97e6c0ab49f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 22 Dec 2014 16:45:04 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/VimeoCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/VimeoCom.py') diff --git a/module/plugins/hoster/VimeoCom.py b/module/plugins/hoster/VimeoCom.py index 9e4abf702..0e42c1674 100644 --- a/module/plugins/hoster/VimeoCom.py +++ b/module/plugins/hoster/VimeoCom.py @@ -41,7 +41,7 @@ class VimeoCom(SimpleHoster): html = self.js.eval(self.load(self.pyfile.url, get={'action': "download", 'password': password}, decode=True)) pattern = r'href="(?Phttp://vimeo\.com.+?)".*?\>(?P.+?) ' else: - id = re.match(self.__pattern__, self.pyfile.url).group("ID") + id = re.match(self.__pattern__, self.pyfile.url).group('ID') html = self.load("https://player.vimeo.com/video/" + id, get={'password': password}) pattern = r'"(?P\w+)":{"profile".*?"(?Phttp://pdl\.vimeocdn\.com.+?)"' -- cgit v1.2.3 From fd105f8e51768ec1943cda2375bdfdbe5b0a3951 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 9 Jan 2015 00:35:51 +0100 Subject: "New Year" Update: hoster plugins --- module/plugins/hoster/VimeoCom.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/VimeoCom.py') diff --git a/module/plugins/hoster/VimeoCom.py b/module/plugins/hoster/VimeoCom.py index 0e42c1674..f7485f025 100644 --- a/module/plugins/hoster/VimeoCom.py +++ b/module/plugins/hoster/VimeoCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class VimeoCom(SimpleHoster): __name__ = "VimeoCom" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?(player\.)?vimeo\.com/(video/)?(?P\d+)' __config__ = [("quality", "Lowest;Mobile;SD;HD;Highest", "Quality", "Highest"), @@ -34,15 +34,14 @@ class VimeoCom(SimpleHoster): self.chunkLimit = -1 - def handleFree(self): + def handleFree(self, pyfile): password = self.getPassword() if self.js and 'class="btn iconify_down_b"' in self.html: - html = self.js.eval(self.load(self.pyfile.url, get={'action': "download", 'password': password}, decode=True)) + html = self.js.eval(self.load(pyfile.url, get={'action': "download", 'password': password}, decode=True)) pattern = r'href="(?Phttp://vimeo\.com.+?)".*?\>(?P.+?) ' else: - id = re.match(self.__pattern__, self.pyfile.url).group('ID') - html = self.load("https://player.vimeo.com/video/" + id, get={'password': password}) + html = self.load("https://player.vimeo.com/video/" + self.info['pattern']['ID'], get={'password': password}) pattern = r'"(?P\w+)":{"profile".*?"(?Phttp://pdl\.vimeocdn\.com.+?)"' link = dict([(l.group('QL').lower(), l.group('URL')) for l in re.finditer(pattern, html)]) -- cgit v1.2.3 From 79725268402043906f619f7c09e848e02ab8a17b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 31 Jan 2015 22:00:59 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/VimeoCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/VimeoCom.py') diff --git a/module/plugins/hoster/VimeoCom.py b/module/plugins/hoster/VimeoCom.py index f7485f025..d427c1511 100644 --- a/module/plugins/hoster/VimeoCom.py +++ b/module/plugins/hoster/VimeoCom.py @@ -44,7 +44,7 @@ class VimeoCom(SimpleHoster): html = self.load("https://player.vimeo.com/video/" + self.info['pattern']['ID'], get={'password': password}) pattern = r'"(?P\w+)":{"profile".*?"(?Phttp://pdl\.vimeocdn\.com.+?)"' - link = dict([(l.group('QL').lower(), l.group('URL')) for l in re.finditer(pattern, html)]) + link = dict((l.group('QL').lower(), l.group('URL')) for l in re.finditer(pattern, html)) if self.getConfig("original"): if "original" in link: -- cgit v1.2.3