summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/FastixRu.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts/FastixRu.py')
-rw-r--r--module/plugins/accounts/FastixRu.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py
index 777b07ce9..d28cc830b 100644
--- a/module/plugins/accounts/FastixRu.py
+++ b/module/plugins/accounts/FastixRu.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
from module.plugins.internal.MultiAccount import MultiAccount
-from module.plugins.internal.utils import json
+from module.plugins.internal.misc import json
class FastixRu(MultiAccount):
__name__ = "FastixRu"
__type__ = "account"
- __version__ = "0.09"
+ __version__ = "0.10"
__status__ = "testing"
__config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
@@ -21,19 +21,20 @@ class FastixRu(MultiAccount):
def grab_hosters(self, user, password, data):
html = self.load("http://fastix.ru/api_v2",
- get={'apikey': "5182964c3f8f9a7f0b00000a_kelmFB4n1IrnCDYuIFn2y",
- 'sub' : "allowed_sources"})
+ get={'apikey': "5182964c3f8f9a7f0b00000a_kelmFB4n1IrnCDYuIFn2y",
+ 'sub' : "allowed_sources"})
host_list = json.loads(html)
host_list = host_list['allow']
return host_list
def grab_info(self, user, password, data):
- html = json.loads(self.load("http://fastix.ru/api_v2/",
- get={'apikey': data['apikey'],
- 'sub' : "getaccountdetails"}))
+ html = self.load("http://fastix.ru/api_v2/",
+ get={'apikey': data['apikey'],
+ 'sub' : "getaccountdetails"})
+ json_data = json.loads(html)
- points = html['points']
+ points = json_data['points']
kb = float(points) * 1024 ** 2 / 1000
if points > 0:
@@ -44,10 +45,11 @@ class FastixRu(MultiAccount):
def signin(self, user, password, data):
- api = json.loads(self.load("https://fastix.ru/api_v2/",
- get={'sub' : "get_apikey",
- 'email' : user,
- 'password': password}))
+ html = self.load("https://fastix.ru/api_v2/",
+ get={'sub' : "get_apikey",
+ 'email' : user,
+ 'password': password})
+ api = json.loads(html)
if 'error' in api:
self.fail_login(api['error_txt'])