diff options
Diffstat (limited to 'module/plugins/hoster/UloziskoSk.py')
-rw-r--r-- | module/plugins/hoster/UloziskoSk.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py index ad809b47c..7cbcb4d40 100644 --- a/module/plugins/hoster/UloziskoSk.py +++ b/module/plugins/hoster/UloziskoSk.py @@ -9,7 +9,8 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UloziskoSk(SimpleHoster): __name__ = "UloziskoSk" __type__ = "hoster" - __version__ = "0.25" + __version__ = "0.26" + __status__ = "testing" __pattern__ = r'http://(?:www\.)?ulozisko\.sk/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -30,17 +31,17 @@ class UloziskoSk(SimpleHoster): def process(self, pyfile): - self.html = self.load(pyfile.url, decode=True) - self.getFileInfo() + self.html = self.load(pyfile.url) + self.get_fileInfo() m = re.search(self.IMG_PATTERN, self.html) if m: self.link = "http://ulozisko.sk" + m.group(1) else: - self.handleFree(pyfile) + self.handle_free(pyfile) - def handleFree(self, pyfile): + def handle_free(self, pyfile): m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: self.error(_("LINK_FREE_PATTERN not found")) @@ -51,22 +52,22 @@ class UloziskoSk(SimpleHoster): self.error(_("ID_PATTERN not found")) id = m.group(1) - self.logDebug("URL:" + parsed_url + ' ID:' + id) + self.log_debug("URL:" + parsed_url + ' ID:' + id) m = re.search(self.CAPTCHA_PATTERN, self.html) if m is None: self.error(_("CAPTCHA_PATTERN not found")) captcha_url = urlparse.urljoin("http://www.ulozisko.sk", m.group(1)) - captcha = self.decryptCaptcha(captcha_url, cookies=True) + captcha = self.captcha.decrypt(captcha_url, cookies=True) - self.logDebug("CAPTCHA_URL:" + captcha_url + ' CAPTCHA:' + captcha) + self.log_debug("CAPTCHA_URL:" + captcha_url + ' CAPTCHA:' + captcha) self.download(parsed_url, - post={"antispam": captcha, - "id" : id, - "name" : pyfile.name, - "but" : "++++STIAHNI+S%DABOR++++"}) + post={'antispam': captcha, + 'id' : id, + 'name' : pyfile.name, + 'but' : "++++STIAHNI+S%DABOR++++"}) getInfo = create_getInfo(UloziskoSk) |