summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/CloudzillaTo.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/CloudzillaTo.py')
-rw-r--r--module/plugins/hoster/CloudzillaTo.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py
index 09453137d..60c66960d 100644
--- a/module/plugins/hoster/CloudzillaTo.py
+++ b/module/plugins/hoster/CloudzillaTo.py
@@ -8,7 +8,8 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class CloudzillaTo(SimpleHoster):
__name__ = "CloudzillaTo"
__type__ = "hoster"
- __version__ = "0.07"
+ __version__ = "0.08"
+ __status__ = "testing"
__pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P<ID>[\w^_]+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -24,9 +25,9 @@ class CloudzillaTo(SimpleHoster):
PASSWORD_PATTERN = r'<div id="pwd_protected">'
- def checkErrors(self):
+ def check_errors(self):
if re.search(self.PASSWORD_PATTERN, self.html):
- pw = self.getPassword()
+ pw = self.get_password()
if pw:
self.html = self.load(self.pyfile.url, get={'key': pw})
else:
@@ -35,16 +36,16 @@ class CloudzillaTo(SimpleHoster):
if re.search(self.PASSWORD_PATTERN, self.html):
self.retry(reason="Wrong password")
else:
- return super(CloudzillaTo, self).checkErrors()
+ return super(CloudzillaTo, self).check_errors()
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.html = self.load("http://www.cloudzilla.to/generateticket/",
- post={'file_id': self.info['pattern']['ID'], 'key': self.getPassword()})
+ post={'file_id': self.info['pattern']['ID'], 'key': self.get_password()})
ticket = dict(re.findall(r'<(.+?)>([^<>]+?)</', self.html))
- self.logDebug(ticket)
+ self.log_debug(ticket)
if 'error' in ticket:
if "File is password protected" in ticket['error']:
@@ -60,8 +61,8 @@ class CloudzillaTo(SimpleHoster):
'ticket_id': ticket['ticket_id']}
- def handlePremium(self, pyfile):
- return self.handleFree(pyfile)
+ def handle_premium(self, pyfile):
+ return self.handle_free(pyfile)
getInfo = create_getInfo(CloudzillaTo)