diff options
-rw-r--r-- | module/plugins/accounts/RapiduNet.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/module/plugins/accounts/RapiduNet.py b/module/plugins/accounts/RapiduNet.py index 2d4770f67..8da698c57 100644 --- a/module/plugins/accounts/RapiduNet.py +++ b/module/plugins/accounts/RapiduNet.py @@ -11,7 +11,7 @@ from module.common.json_layer import json_loads class RapiduNet(Account): __name__ = "RapiduNet" __type__ = "account" - __version__ = "0.04" + __version__ = "0.05" __description__ = """Rapidu.net account plugin""" __license__ = "GPLv3" @@ -23,6 +23,8 @@ class RapiduNet(Account): VALID_UNTIL_PATTERN = r'>Account: <b>\w+ \((\d+)' + TRAFFIC_LEFT_PATTERN = r'class="tipsyS"><b>(.+?)<' + def loadAccountInfo(self, user, req): validuntil = None @@ -38,6 +40,10 @@ class RapiduNet(Account): if m: validuntil = time() + (86400 * int(m.group(1))) + m = re.search(self.TRAFFIC_LEFT_PATTERN, html) + if m: + trafficleft = self.parseTraffic(m.group(1)) + return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} |