From c1764e2fea0bb05164c83a876e8cd58b97f58f25 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 16 Jun 2015 17:31:38 +0200 Subject: Update all --- 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 6410a2dce..e7b6d044f 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -36,7 +36,7 @@ class UpstoreNet(SimpleHoster): self.logDebug("Read hash " + chash) # continue to stage2 post_data = {'hash': chash, 'free': 'Slow download'} - self.html = self.load(pyfile.url, post=post_data, decode=True) + self.html = self.load(pyfile.url, post=post_data) # STAGE 2: solv captcha and wait # first get the infos we need: recaptcha key and wait time @@ -57,7 +57,7 @@ class UpstoreNet(SimpleHoster): post_data.update({'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) - self.html = self.load(pyfile.url, post=post_data, decode=True) + self.html = self.load(pyfile.url, post=post_data) # STAGE 3: get direct link m = re.search(self.LINK_FREE_PATTERN, self.html, re.S) -- cgit v1.2.3 From 20b6a2ec022202b0efb6cb69415239fb8f4d1445 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:59:20 +0200 Subject: Spare code cosmetics (2) --- module/plugins/hoster/UpstoreNet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index e7b6d044f..342009c98 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -34,7 +34,7 @@ class UpstoreNet(SimpleHoster): self.error(_("CHASH_PATTERN not found")) chash = m.group(1) self.logDebug("Read hash " + chash) - # continue to stage2 + #: continue to stage2 post_data = {'hash': chash, 'free': 'Slow download'} self.html = self.load(pyfile.url, post=post_data) @@ -42,17 +42,17 @@ class UpstoreNet(SimpleHoster): # first get the infos we need: recaptcha key and wait time recaptcha = ReCaptcha(self) - # try the captcha 5 times + #: try the captcha 5 times for i in xrange(5): m = re.search(self.WAIT_PATTERN, self.html) if m is None: self.error(_("Wait pattern not found")) wait_time = int(m.group(1)) - # then, do the waiting + #: then, do the waiting self.wait(wait_time) - # then, handle the captcha + #: then, handle the captcha response, challenge = recaptcha.challenge() post_data.update({'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/hoster/UpstoreNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 342009c98..f628e1db3 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.06" + __version__ = "0.07" __pattern__ = r'https?://(?:www\.)?upstore\.net/' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -27,13 +27,13 @@ class UpstoreNet(SimpleHoster): LINK_FREE_PATTERN = r'' - def handleFree(self, pyfile): + def handle_free(self, pyfile): # STAGE 1: get link to continue m = re.search(self.CHASH_PATTERN, self.html) if m is None: self.error(_("CHASH_PATTERN not found")) chash = m.group(1) - self.logDebug("Read hash " + chash) + self.log_debug("Read hash " + chash) #: continue to stage2 post_data = {'hash': chash, 'free': 'Slow download'} self.html = self.load(pyfile.url, post=post_data) -- cgit v1.2.3 From dad722ac7255640e7e0541c4094a4d2e4de79cd3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 00:05:58 +0200 Subject: Code cosmetics (2) --- 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 f628e1db3..7c014d53f 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -28,21 +28,21 @@ class UpstoreNet(SimpleHoster): def handle_free(self, pyfile): - # STAGE 1: get link to continue + #: STAGE 1: get link to continue m = re.search(self.CHASH_PATTERN, self.html) if m is None: self.error(_("CHASH_PATTERN not found")) chash = m.group(1) self.log_debug("Read hash " + chash) - #: continue to stage2 + #: Continue to stage2 post_data = {'hash': chash, 'free': 'Slow download'} self.html = self.load(pyfile.url, post=post_data) - # STAGE 2: solv captcha and wait - # first get the infos we need: recaptcha key and wait time + #: STAGE 2: solv captcha and wait + #: First get the infos we need: recaptcha key and wait time recaptcha = ReCaptcha(self) - #: try the captcha 5 times + #: Try the captcha 5 times for i in xrange(5): m = re.search(self.WAIT_PATTERN, self.html) if m is None: @@ -59,7 +59,7 @@ class UpstoreNet(SimpleHoster): self.html = self.load(pyfile.url, post=post_data) - # STAGE 3: get direct link + #: STAGE 3: get direct link m = re.search(self.LINK_FREE_PATTERN, self.html, re.S) if m: break -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/hoster/UpstoreNet.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 7c014d53f..49578aafe 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -10,6 +10,7 @@ class UpstoreNet(SimpleHoster): __name__ = "UpstoreNet" __type__ = "hoster" __version__ = "0.07" + __status__ = "stable" __pattern__ = r'https?://(?:www\.)?upstore\.net/' __config__ = [("use_premium", "bool", "Use premium account if available", True)] -- cgit v1.2.3 From 6af9b38a8d5d49355b85aef6ddd003605d6bba05 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 23 Jul 2015 23:44:45 +0200 Subject: Improve Captcha --- module/plugins/hoster/UpstoreNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 49578aafe..21c359cc2 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -2,7 +2,7 @@ import re -from module.plugins.internal.ReCaptcha import ReCaptcha +from module.plugins.captcha.ReCaptcha import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- module/plugins/hoster/UpstoreNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 21c359cc2..12c667efb 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -10,7 +10,7 @@ class UpstoreNet(SimpleHoster): __name__ = "UpstoreNet" __type__ = "hoster" __version__ = "0.07" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'https?://(?:www\.)?upstore\.net/' __config__ = [("use_premium", "bool", "Use premium account if available", True)] -- cgit v1.2.3