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/UpstoreNet.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 25c424f1f..f287a2b51 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UpstoreNet(SimpleHoster): __name__ = "UpstoreNet" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?upstore\.net/' @@ -23,10 +23,10 @@ class UpstoreNet(SimpleHoster): WAIT_PATTERN = r'var sec = (\d+)' CHASH_PATTERN = r'' - LINK_PATTERN = r'' + LINK_FREE_PATTERN = r'' - def handleFree(self): + def handleFree(self, pyfile): # STAGE 1: get link to continue m = re.search(self.CHASH_PATTERN, self.html) if m is None: @@ -35,7 +35,7 @@ class UpstoreNet(SimpleHoster): self.logDebug("Read hash " + chash) # continue to stage2 post_data = {'hash': chash, 'free': 'Slow download'} - self.html = self.load(self.pyfile.url, post=post_data, decode=True) + self.html = self.load(pyfile.url, post=post_data, decode=True) # STAGE 2: solv captcha and wait # first get the infos we need: recaptcha key and wait time @@ -56,10 +56,10 @@ class UpstoreNet(SimpleHoster): post_data.update({'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) - self.html = self.load(self.pyfile.url, post=post_data, decode=True) + self.html = self.load(pyfile.url, post=post_data, decode=True) # STAGE 3: get direct link - m = re.search(self.LINK_PATTERN, self.html, re.S) + m = re.search(self.LINK_FREE_PATTERN, self.html, re.S) if m: break -- 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/UpstoreNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index f287a2b51..db9fa53a1 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UpstoreNet(SimpleHoster): __name__ = "UpstoreNet" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'https?://(?:www\.)?upstore\.net/' @@ -52,7 +52,7 @@ class UpstoreNet(SimpleHoster): self.wait(wait_time) # then, handle the captcha - challenge, response = recaptcha.challenge() + response, challenge = recaptcha.challenge() post_data.update({'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) -- cgit v1.2.3 From 6616c00ba1c40f5d56959bd0e4725f26250e1292 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 9 Feb 2015 17:42:31 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/UpstoreNet.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index db9fa53a1..13119eefd 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -66,8 +66,7 @@ class UpstoreNet(SimpleHoster): if m is None: self.error(_("Download link not found")) - direct = m.group(1) - self.download(direct, disposition=True) + self.link = m.group(1) getInfo = create_getInfo(UpstoreNet) -- cgit v1.2.3