diff options
Diffstat (limited to 'module/plugins/accounts/FastixRu.py')
-rw-r--r-- | module/plugins/accounts/FastixRu.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py index 049ee9f77..ced49125a 100644 --- a/module/plugins/accounts/FastixRu.py +++ b/module/plugins/accounts/FastixRu.py @@ -16,11 +16,11 @@ class FastixRu(Account): def loadAccountInfo(self, user, req): data = self.getAccountData(user) - page = req.load("http://fastix.ru/api_v2/?apikey=%s&sub=getaccountdetails" % (data['api'])) - page = json_loads(page) + page = json_loads(req.load("http://fastix.ru/api_v2/", get={'apikey': data['api'], 'sub': "getaccountdetails"})) + points = page['points'] - kb = float(points) - kb = kb * 1024 ** 2 / 1000 + kb = float(points) * 1024 ** 2 / 1000 + if points > 0: account_info = {"validuntil": -1, "trafficleft": kb} else: @@ -29,7 +29,8 @@ class FastixRu(Account): def login(self, user, data, req): - page = req.load("http://fastix.ru/api_v2/?sub=get_apikey&email=%s&password=%s" % (user, data['password'])) + page = req.load("http://fastix.ru/api_v2/", + get={'sub': "get_apikey", 'email': user, 'password': data['password']}) api = json_loads(page) api = api['apikey'] data['api'] = api |