diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-02 01:17:16 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-02 01:17:16 +0100 |
commit | 3639af423fab5d905e9222f0125aeea2dcf58118 (patch) | |
tree | 064a8c45bdbd6f20e3094a3e54174bb4487d65b1 /module/plugins/accounts | |
parent | [RapiduNet] Fixup (2) (diff) | |
download | pyload-3639af423fab5d905e9222f0125aeea2dcf58118.tar.xz |
[RapiduNet] Account trafficleft
Diffstat (limited to 'module/plugins/accounts')
-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} |