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/FilerNet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 2a38ac470..159aab964 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' @@ -42,12 +42,12 @@ class FilerNet(SimpleHoster): self.info.pop('error', None) - def handleFree(self): + def handleFree(self, pyfile): inputs = self.parseHtmlForm(input_names={'token': re.compile(r'.+')})[1] if 'token' not in inputs: self.error(_("Unable to detect token")) - self.html = self.load(self.pyfile.url, post={'token': inputs['token']}, decode=True) + self.html = self.load(pyfile.url, post={'token': inputs['token']}, decode=True) inputs = self.parseHtmlForm(input_names={'hash': re.compile(r'.+')})[1] if 'hash' not in inputs: @@ -61,7 +61,7 @@ class FilerNet(SimpleHoster): #@NOTE: Work-around for v0.4.9 just_header issue #@TODO: Check for v0.4.10 self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) - self.load(self.pyfile.url, post={'recaptcha_challenge_field': challenge, + self.load(pyfile.url, post={'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response, 'hash' : inputs['hash']}) self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1) -- cgit v1.2.3 From 56db4681e9dfa77b1e616d600d19ba98c915fef9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 13 Jan 2015 01:47:03 +0100 Subject: [FilerNet] Code cosmetics --- module/plugins/hoster/FilerNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 159aab964..a668a834b 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -62,8 +62,8 @@ class FilerNet(SimpleHoster): #@TODO: Check for v0.4.10 self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) self.load(pyfile.url, post={'recaptcha_challenge_field': challenge, - 'recaptcha_response_field' : response, - 'hash' : inputs['hash']}) + 'recaptcha_response_field' : response, + 'hash' : inputs['hash']}) self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1) if 'location' in self.req.http.header.lower(): -- cgit v1.2.3 From cf4ded052964047de88d676045329b8fa4fca2dc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 22 Jan 2015 21:31:19 +0100 Subject: Update plugins after CaptchaService changes --- module/plugins/hoster/FilerNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index a668a834b..f0b37e4cb 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.13" + __version__ = "0.14" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' @@ -56,7 +56,7 @@ class FilerNet(SimpleHoster): recaptcha = ReCaptcha(self) for _i in xrange(5): - challenge, response = recaptcha.challenge() + response, challenge = recaptcha.challenge() #@NOTE: Work-around for v0.4.9 just_header issue #@TODO: Check for v0.4.10 -- cgit v1.2.3 From 031d86706aa13270793e31c21ad3f386ca62752b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 24 Jan 2015 03:50:33 +0100 Subject: Spare code improvements --- module/plugins/hoster/FilerNet.py | 43 ++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 25 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index f0b37e4cb..53fa2bda1 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.14" + __version__ = "0.15" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' @@ -53,30 +53,23 @@ class FilerNet(SimpleHoster): if 'hash' not in inputs: self.error(_("Unable to detect hash")) - recaptcha = ReCaptcha(self) - - for _i in xrange(5): - response, challenge = recaptcha.challenge() - - #@NOTE: Work-around for v0.4.9 just_header issue - #@TODO: Check for v0.4.10 - self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) - self.load(pyfile.url, post={'recaptcha_challenge_field': challenge, - 'recaptcha_response_field' : response, - 'hash' : inputs['hash']}) - self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1) - - if 'location' in self.req.http.header.lower(): - self.link = re.search(r'location: (\S+)', self.req.http.header, re.I).group(1) - self.correctCaptcha() - break - else: - self.invalidCaptcha() - - - def downloadLink(self, link): - if link and isinstance(link, basestring): - self.download(urljoin("http://filer.net/", link), disposition=True) + recaptcha = ReCaptcha(self) + response, challenge = recaptcha.challenge() + + #@NOTE: Work-around for v0.4.9 just_header issue + #@TODO: Check for v0.4.10 + self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) + self.load(pyfile.url, post={'recaptcha_challenge_field': challenge, + 'recaptcha_response_field' : response, + 'hash' : inputs['hash']}) + self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1) + + if 'location' in self.req.http.header.lower(): + self.link = re.search(r'location: (\S+)', self.req.http.header, re.I).group(1) + self.correctCaptcha() + break + else: + self.invalidCaptcha() getInfo = create_getInfo(FilerNet) -- cgit v1.2.3 From 95a72c40b34e2facb2aa693f164abd83e55b31ce Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 27 Jan 2015 01:21:11 +0100 Subject: [FilerNet] Fix typo --- module/plugins/hoster/FilerNet.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 53fa2bda1..c5007e945 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' @@ -67,7 +67,6 @@ class FilerNet(SimpleHoster): if 'location' in self.req.http.header.lower(): self.link = re.search(r'location: (\S+)', self.req.http.header, re.I).group(1) self.correctCaptcha() - break else: self.invalidCaptcha() -- cgit v1.2.3 From 85bba1418987aa3e8b11a75a2732577da6008d8a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 10 Mar 2015 16:29:19 +0100 Subject: [FilerNet] Fix WAIT_PATTERN --- module/plugins/hoster/FilerNet.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index c5007e945..e790272f4 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' @@ -29,17 +29,9 @@ class FilerNet(SimpleHoster): INFO_PATTERN = r'

Free Download (?P\S+) (?P[\w.]+) (?P[\w^_]+)

' OFFLINE_PATTERN = r'Nicht gefunden' - LINK_FREE_PATTERN = LINK_PREMIUM_PATTERN = r'href="([^"]+)">Get download' - + WAIT_PATTERN = r'musst du (\d+)' - def checkErrors(self): - # Wait between downloads - m = re.search(r'musst du (\d+) Sekunden warten', self.html) - if m: - errmsg = self.info['error'] = _("Wait between free downloads") - self.retry(wait_time=int(m.group(1)), reason=errmsg) - - self.info.pop('error', None) + LINK_FREE_PATTERN = LINK_PREMIUM_PATTERN = r'href="([^"]+)">Get download' def handleFree(self, pyfile): -- cgit v1.2.3 From e113228d008b78ff45db52f4917fef392c38b5e3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 10 Mar 2015 22:38:17 +0100 Subject: [FilerNet] Fix https://github.com/pyload/pyload/issues/1201 --- module/plugins/hoster/FilerNet.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index e790272f4..b8a97d6a1 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' @@ -63,4 +63,10 @@ class FilerNet(SimpleHoster): self.invalidCaptcha() + def checkFile(self, rules={}): + if self.checkDownload({'Html file': re.compile(r'\A\s* Date: Wed, 11 Mar 2015 14:22:45 +0100 Subject: [SimpleHoster] Fix https://github.com/pyload/pyload/issues/1248 --- module/plugins/hoster/FilerNet.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index b8a97d6a1..a37decb69 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.18" + __version__ = "0.19" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' @@ -63,10 +63,4 @@ class FilerNet(SimpleHoster): self.invalidCaptcha() - def checkFile(self, rules={}): - if self.checkDownload({'Html file': re.compile(r'\A\s* Date: Wed, 25 Mar 2015 23:10:07 +0100 Subject: __config__ cosmetics --- module/plugins/hoster/FilerNet.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index a37decb69..22ca3725a 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -19,6 +19,7 @@ class FilerNet(SimpleHoster): __version__ = "0.19" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' + __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Filer.net hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 1ef93e913238275f7657d496ba3d2e7eeb5a30a2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 May 2015 01:06:01 +0200 Subject: Use 'import' instead 'from' --- module/plugins/hoster/FilerNet.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 22ca3725a..156392c79 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -6,8 +6,7 @@ import pycurl import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.CaptchaService import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -- cgit v1.2.3