diff options
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/RapiduNet.py | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/module/plugins/accounts/RapiduNet.py b/module/plugins/accounts/RapiduNet.py index fe465bc48..60283e5bd 100644 --- a/module/plugins/accounts/RapiduNet.py +++ b/module/plugins/accounts/RapiduNet.py @@ -8,7 +8,7 @@ from module.common.json_layer import json_loads class RapiduNet(Account): __name__ = "RapiduNet" __type__ = "account" - __version__ = "0.02" + __version__ = "0.03" __description__ = """Rapidu.net account plugin""" __license__ = "GPLv3" @@ -19,24 +19,29 @@ class RapiduNet(Account): def loadAccountInfo(self, user, req): - info = {'validuntil': None, 'trafficleft': None, 'premium': False} + validuntil = None + trafficleft = None + premium = False + + req.load("https://rapidu.net/ajax.php?a=getChangeLang", + post={'_go': "", 'lang': "en"}) - req.load("https://rapidu.net/ajax.php", get={'a': "getChangeLang"}, post={"_go": "", "lang": "en"}) html = req.load("https://rapidu.net/", decode=True) if re.search(self.PREMIUM_PATTERN, html): - info['premium'] = True + premium = True + trafficleft = -1 - return info + return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} def login(self, user, data, req): try: json = json_loads(req.load("https://rapidu.net/ajax.php?a=getUserLogin", - post={'_go': "", - 'login': user, - 'pass': data['password'], - 'member': "1"})) + post={'_go' : "", + 'login' : user, + 'pass' : data['password'], + 'remember': "1"})) self.logDebug(json) |