diff options
Diffstat (limited to 'module/plugins/hoster/UnibytesCom.py')
-rw-r--r-- | module/plugins/hoster/UnibytesCom.py | 16 |
1 files changed, 8 insertions, 8 deletions
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'<a href="(.+?)">Download</a>' - 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")) |