diff options
Diffstat (limited to 'module/plugins/accounts/Keep2ShareCc.py')
-rw-r--r-- | module/plugins/accounts/Keep2ShareCc.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/module/plugins/accounts/Keep2ShareCc.py b/module/plugins/accounts/Keep2ShareCc.py index 014d43a69..32bccc2e4 100644 --- a/module/plugins/accounts/Keep2ShareCc.py +++ b/module/plugins/accounts/Keep2ShareCc.py @@ -10,7 +10,7 @@ from module.plugins.internal.Plugin import set_cookie class Keep2ShareCc(Account): __name__ = "Keep2ShareCc" __type__ = "account" - __version__ = "0.08" + __version__ = "0.10" __status__ = "testing" __description__ = """Keep2Share.cc account plugin""" @@ -25,7 +25,7 @@ class Keep2ShareCc(Account): LOGIN_FAIL_PATTERN = r'Please fix the following input errors' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data): validuntil = None trafficleft = -1 premium = False @@ -33,7 +33,7 @@ class Keep2ShareCc(Account): html = self.load("http://keep2share.cc/site/profile.html") m = re.search(self.VALID_UNTIL_PATTERN, html) - if m: + if m is not None: expiredate = m.group(1).strip() self.log_debug("Expire date: " + expiredate) @@ -51,7 +51,7 @@ class Keep2ShareCc(Account): premium = True if validuntil > time.mktime(time.gmtime()) else False m = re.search(self.TRAFFIC_LEFT_PATTERN, html) - if m: + if m is not None: try: trafficleft = self.parse_traffic(m.group(1)) @@ -61,8 +61,8 @@ class Keep2ShareCc(Account): return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} - def login(self, user, password, data, req): - set_cookie(req.cj, "keep2share.cc", "lang", "en") + def signin(self, user, password, data): + set_cookie(self.req.cj, "keep2share.cc", "lang", "en") html = self.load("https://keep2share.cc/login.html", post={'LoginForm[username]' : user, @@ -71,4 +71,4 @@ class Keep2ShareCc(Account): 'yt0' : ""}) if re.search(self.LOGIN_FAIL_PATTERN, html): - self.login_fail() + self.fail_login() |