diff options
Diffstat (limited to 'module/plugins/hoster/FileSharkPl.py')
-rw-r--r-- | module/plugins/hoster/FileSharkPl.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index d01a34bad..595d0c7ed 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FileSharkPl(SimpleHoster): __name__ = "FileSharkPl" __type__ = "hoster" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -37,16 +37,16 @@ class FileSharkPl(SimpleHoster): def setup(self): - self.resumeDownload = True + self.resume_download = True if self.premium: - self.multiDL = True - self.limitDL = 20 + self.multi_dl = True + self.limit_dl = 20 else: - self.multiDL = False + self.multi_dl = False - def checkErrors(self): + def check_errors(self): #: check if file is now available for download (-> file name can be found in html body) m = re.search(self.WAIT_PATTERN, self.html) if m: @@ -62,7 +62,7 @@ class FileSharkPl(SimpleHoster): elif re.match(self.SLOT_ERROR_PATTERN, alert): errmsg = self.info['error'] = _("No free download slots available") - self.logWarning(errmsg) + self.log_warning(errmsg) self.retry(10, 30 * 60, _("Still no free download slots available")) else: @@ -72,7 +72,7 @@ class FileSharkPl(SimpleHoster): self.info.pop('error', None) - def handleFree(self, pyfile): + def handle_free(self, pyfile): m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: self.error(_("Download url not found")) @@ -84,10 +84,10 @@ class FileSharkPl(SimpleHoster): m = re.search(self.WAIT_PATTERN, self.html) if m: seconds = int(m.group(1)) - self.logDebug("Wait %s seconds" % seconds) + self.log_debug("Wait %s seconds" % seconds) self.wait(seconds) - action, inputs = self.parseHtmlForm('action=""') + action, inputs = self.parse_html_form('action=""') m = re.search(self.TOKEN_PATTERN, self.html) if m is None: @@ -102,7 +102,7 @@ class FileSharkPl(SimpleHoster): tmp_load = self.load self.load = self._decode64 #: work-around: injects decode64 inside decryptCaptcha - inputs['form[captcha]'] = self.decryptCaptcha(m.group(1), imgtype='jpeg') + inputs['form[captcha]'] = self.decrypt_captcha(m.group(1), imgtype='jpeg') inputs['form[start]'] = "" self.load = tmp_load |