diff options
Diffstat (limited to 'module/plugins/accounts/RapiduNet.py')
-rw-r--r-- | module/plugins/accounts/RapiduNet.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/module/plugins/accounts/RapiduNet.py b/module/plugins/accounts/RapiduNet.py index 1ec29bd77..c11eb9214 100644 --- a/module/plugins/accounts/RapiduNet.py +++ b/module/plugins/accounts/RapiduNet.py @@ -10,7 +10,7 @@ from module.common.json_layer import json_loads class RapiduNet(Account): __name__ = "RapiduNet" __type__ = "account" - __version__ = "0.07" + __version__ = "0.09" __status__ = "testing" __description__ = """Rapidu.net account plugin""" @@ -26,7 +26,7 @@ class RapiduNet(Account): TRAFFIC_LEFT_PATTERN = r'class="tipsyS"><b>(.+?)<' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data): validuntil = None trafficleft = -1 premium = False @@ -37,17 +37,17 @@ class RapiduNet(Account): premium = True m = re.search(self.VALID_UNTIL_PATTERN, html) - if m: + if m is not None: validuntil = time.time() + (86400 * int(m.group(1))) m = re.search(self.TRAFFIC_LEFT_PATTERN, html) - if m: + if m is not None: trafficleft = self.parse_traffic(m.group(1)) return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} - def login(self, user, password, data, req): + def signin(self, user, password, data): self.load("https://rapidu.net/ajax.php", get={'a': "getChangeLang"}, post={'_go' : "", @@ -62,5 +62,5 @@ class RapiduNet(Account): self.log_debug(json) - if not json['message'] == "success": - self.login_fail() + if json['message'] != "success": + self.fail_login() |