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/UnibytesCom.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'module/plugins/hoster/UnibytesCom.py') diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py index d090c8e7d..6763f6cb2 100644 --- a/module/plugins/hoster/UnibytesCom.py +++ b/module/plugins/hoster/UnibytesCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UnibytesCom(SimpleHoster): __name__ = "UnibytesCom" __type__ = "hoster" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'https?://(?:www\.)?unibytes\.com/[\w .-]{11}B' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -28,14 +28,14 @@ class UnibytesCom(SimpleHoster): LINK_FREE_PATTERN = r'Download' - def handleFree(self, pyfile): + def handle_free(self, pyfile): domain = "http://www.%s/" % self.HOSTER_DOMAIN - action, post_data = self.parseHtmlForm('id="startForm"') + action, post_data = self.parse_html_form('id="startForm"') self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) for _i in xrange(8): - self.logDebug(action, post_data) + self.log_debug(action, post_data) self.html = self.load(urlparse.urljoin(domain, action), post=post_data) m = re.search(r'location:\s*(\S+)', self.req.http.header, re.I) @@ -51,20 +51,20 @@ class UnibytesCom(SimpleHoster): m = re.search(self.LINK_FREE_PATTERN, self.html) if m: self.link = m.group(1) - self.correctCaptcha() + self.correct_captcha() break else: - self.invalidCaptcha() + self.invalid_captcha() last_step = post_data['step'] - action, post_data = self.parseHtmlForm('id="stepForm"') + action, post_data = self.parse_html_form('id="stepForm"') if last_step == 'timer': m = re.search(self.WAIT_PATTERN, self.html) self.wait(m.group(1) if m else 60, False) elif last_step in ("captcha", "last"): - post_data['captcha'] = self.decryptCaptcha(urlparse.urljoin(domain, "/captcha.jpg")) + post_data['captcha'] = self.decrypt_captcha(urlparse.urljoin(domain, "/captcha.jpg")) else: self.fail(_("No valid captcha code entered")) -- 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/UnibytesCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/UnibytesCom.py') diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py index 6763f6cb2..5b4295cb2 100644 --- a/module/plugins/hoster/UnibytesCom.py +++ b/module/plugins/hoster/UnibytesCom.py @@ -11,6 +11,7 @@ class UnibytesCom(SimpleHoster): __name__ = "UnibytesCom" __type__ = "hoster" __version__ = "0.13" + __status__ = "stable" __pattern__ = r'https?://(?:www\.)?unibytes\.com/[\w .-]{11}B' __config__ = [("use_premium", "bool", "Use premium account if available", True)] -- cgit v1.2.3 From 027cb529d79558de19c47da88a782b31745a65c9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 21 Jul 2015 22:53:37 +0200 Subject: New Captcha skeleton --- module/plugins/hoster/UnibytesCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/UnibytesCom.py') diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py index 5b4295cb2..96b2fb031 100644 --- a/module/plugins/hoster/UnibytesCom.py +++ b/module/plugins/hoster/UnibytesCom.py @@ -52,10 +52,10 @@ class UnibytesCom(SimpleHoster): m = re.search(self.LINK_FREE_PATTERN, self.html) if m: self.link = m.group(1) - self.correct_captcha() + self.captcha.correct() break else: - self.invalid_captcha() + self.captcha.invalid() last_step = post_data['step'] action, post_data = self.parse_html_form('id="stepForm"') @@ -65,7 +65,7 @@ class UnibytesCom(SimpleHoster): self.wait(m.group(1) if m else 60, False) elif last_step in ("captcha", "last"): - post_data['captcha'] = self.decrypt_captcha(urlparse.urljoin(domain, "/captcha.jpg")) + post_data['captcha'] = self.captcha.decrypt_image(urlparse.urljoin(domain, "/captcha.jpg")) else: self.fail(_("No valid captcha code entered")) -- 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/UnibytesCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/UnibytesCom.py') diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py index 96b2fb031..1c1a0bd2b 100644 --- a/module/plugins/hoster/UnibytesCom.py +++ b/module/plugins/hoster/UnibytesCom.py @@ -65,7 +65,7 @@ class UnibytesCom(SimpleHoster): self.wait(m.group(1) if m else 60, False) elif last_step in ("captcha", "last"): - post_data['captcha'] = self.captcha.decrypt_image(urlparse.urljoin(domain, "/captcha.jpg")) + post_data['captcha'] = self.captcha.decrypt(urlparse.urljoin(domain, "/captcha.jpg")) else: self.fail(_("No valid captcha code entered")) -- 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/UnibytesCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/UnibytesCom.py') diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py index 1c1a0bd2b..1410a7e59 100644 --- a/module/plugins/hoster/UnibytesCom.py +++ b/module/plugins/hoster/UnibytesCom.py @@ -11,7 +11,7 @@ class UnibytesCom(SimpleHoster): __name__ = "UnibytesCom" __type__ = "hoster" __version__ = "0.13" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'https?://(?:www\.)?unibytes\.com/[\w .-]{11}B' __config__ = [("use_premium", "bool", "Use premium account if available", True)] -- cgit v1.2.3 From 761ca5c66e07559925ebbdbc6531f9ca658b12ce Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 16:11:58 +0200 Subject: Code cosmetics --- module/plugins/hoster/UnibytesCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/UnibytesCom.py') diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py index 1410a7e59..3ea53e719 100644 --- a/module/plugins/hoster/UnibytesCom.py +++ b/module/plugins/hoster/UnibytesCom.py @@ -48,7 +48,7 @@ class UnibytesCom(SimpleHoster): self.wait(10 * 60, True) self.retry() - if post_data['step'] == 'last': + if post_data['step'] == "last"': m = re.search(self.LINK_FREE_PATTERN, self.html) if m: self.link = m.group(1) @@ -60,7 +60,7 @@ class UnibytesCom(SimpleHoster): last_step = post_data['step'] action, post_data = self.parse_html_form('id="stepForm"') - if last_step == 'timer': + if last_step == "timer": m = re.search(self.WAIT_PATTERN, self.html) self.wait(m.group(1) if m else 60, False) -- cgit v1.2.3 From 5745baca2dd9c8831631489781ef950af5184081 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Jul 2015 22:06:31 +0200 Subject: Fix https://github.com/pyload/pyload/issues/1520 --- module/plugins/hoster/UnibytesCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/UnibytesCom.py') diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py index 3ea53e719..ac2589f47 100644 --- a/module/plugins/hoster/UnibytesCom.py +++ b/module/plugins/hoster/UnibytesCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UnibytesCom(SimpleHoster): __name__ = "UnibytesCom" __type__ = "hoster" - __version__ = "0.13" + __version__ = "0.14" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?unibytes\.com/[\w .-]{11}B' @@ -48,7 +48,7 @@ class UnibytesCom(SimpleHoster): self.wait(10 * 60, True) self.retry() - if post_data['step'] == "last"': + if post_data['step'] == "last": m = re.search(self.LINK_FREE_PATTERN, self.html) if m: self.link = m.group(1) -- cgit v1.2.3