summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/FastixRu.py22
-rw-r--r--module/plugins/accounts/HighWayMe.py4
-rw-r--r--module/plugins/accounts/NoPremiumPl.py3
-rw-r--r--module/plugins/accounts/OboomCom.py7
-rw-r--r--module/plugins/accounts/OverLoadMe.py8
-rw-r--r--module/plugins/accounts/RapideoPl.py3
-rw-r--r--module/plugins/accounts/RapidgatorNet.py22
-rw-r--r--module/plugins/accounts/RapiduNet.py17
-rw-r--r--module/plugins/accounts/SmoozedCom.py7
9 files changed, 50 insertions, 43 deletions
diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py
index 33f7eeae9..d28cc830b 100644
--- a/module/plugins/accounts/FastixRu.py
+++ b/module/plugins/accounts/FastixRu.py
@@ -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'])
diff --git a/module/plugins/accounts/HighWayMe.py b/module/plugins/accounts/HighWayMe.py
index b2759e63b..13807c99f 100644
--- a/module/plugins/accounts/HighWayMe.py
+++ b/module/plugins/accounts/HighWayMe.py
@@ -20,8 +20,8 @@ class HighWayMe(MultiAccount):
def grab_hosters(self, user, password, data):
- json_data = json.loads(self.load("https://high-way.me/api.php",
- get={'hoster': 1}))
+ html = self.load("https://high-way.me/api.php", get={'hoster': 1})
+ json_data = json.loads(html)
return [element['name'] for element in json_data['hoster']]
diff --git a/module/plugins/accounts/NoPremiumPl.py b/module/plugins/accounts/NoPremiumPl.py
index ae2f71564..d61c7cbdd 100644
--- a/module/plugins/accounts/NoPremiumPl.py
+++ b/module/plugins/accounts/NoPremiumPl.py
@@ -32,7 +32,8 @@ class NoPremiumPl(MultiAccount):
'info' : "1" }
def grab_hosters(self, user, password, data):
- hostings = json.loads(self.load("https://www.nopremium.pl/clipboard.php?json=3").strip())
+ html = self.load("https://www.nopremium.pl/clipboard.php?json=3").strip()
+ hostings = json.loads(html)
hostings_domains = [domain for row in hostings for domain in row['domains'] if row['sdownload'] == "0"]
self.log_debug(hostings_domains)
diff --git a/module/plugins/accounts/OboomCom.py b/module/plugins/accounts/OboomCom.py
index eeb2b1fd4..cb3342e49 100644
--- a/module/plugins/accounts/OboomCom.py
+++ b/module/plugins/accounts/OboomCom.py
@@ -35,9 +35,10 @@ class OboomCom(Account):
salt = password[::-1]
pbkdf2 = PBKDF2(password, salt, 1000).hexread(16)
- result = json.loads(self.load("http://www.oboom.com/1/login", #@TODO: Revert to `https` in 0.4.10
- get={'auth': user,
- 'pass': pbkdf2}))
+ html = self.load("http://www.oboom.com/1/login", #@TODO: Revert to `https` in 0.4.10
+ get={'auth': user,
+ 'pass': pbkdf2})
+ result = json.loads(html)
if result[0] is not 200:
self.log_warning(_("Failed to log in: %s") % result[1])
diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py
index 1f12fde83..0155d4efc 100644
--- a/module/plugins/accounts/OverLoadMe.py
+++ b/module/plugins/accounts/OverLoadMe.py
@@ -41,11 +41,11 @@ class OverLoadMe(MultiAccount):
def signin(self, user, password, data):
- jsondata = self.load("https://api.over-load.me/account.php",
- get={'user': user,
- 'auth': password}).strip()
+ html = self.load("https://api.over-load.me/account.php",
+ get={'user': user,
+ 'auth': password}).strip()
- data = json.loads(jsondata)
+ data = json.loads(html)
if data['err'] is 1:
self.fail_login()
diff --git a/module/plugins/accounts/RapideoPl.py b/module/plugins/accounts/RapideoPl.py
index a92b9e345..30e35dc39 100644
--- a/module/plugins/accounts/RapideoPl.py
+++ b/module/plugins/accounts/RapideoPl.py
@@ -32,7 +32,8 @@ class RapideoPl(MultiAccount):
'info' : "1" }
def grab_hosters(self, user, password, data):
- hostings = json.loads(self.load("https://www.rapideo.pl/clipboard.php?json=3").strip())
+ html = self.load("https://www.rapideo.pl/clipboard.php?json=3").strip()
+ hostings = json.loads(html)
hostings_domains = [domain for row in hostings for domain in row['domains'] if row['sdownload'] == "0"]
self.log_debug(hostings_domains)
diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py
index e1f194afe..3057fb34c 100644
--- a/module/plugins/accounts/RapidgatorNet.py
+++ b/module/plugins/accounts/RapidgatorNet.py
@@ -34,17 +34,17 @@ class RapidgatorNet(Account):
self.log_debug("API:USERINFO", html)
- jso = json.loads(html)
+ json_data = json.loads(html)
- if jso['response_status'] is 200:
- if "reset_in" in jso['response']:
- self._schedule_refresh(user, jso['response']['reset_in'])
+ if json_data['response_status'] is 200:
+ if "reset_in" in json_data['response']:
+ self._schedule_refresh(user, json_data['response']['reset_in'])
- validuntil = jso['response']['expire_date']
- trafficleft = float(jso['response']['traffic_left']) / 1024 #@TODO: Remove `/ 1024` in 0.4.10
+ validuntil = json_data['response']['expire_date']
+ trafficleft = float(json_data['response']['traffic_left']) / 1024 #@TODO: Remove `/ 1024` in 0.4.10
premium = True
else:
- self.log_error(jso['response_details'])
+ self.log_error(json_data['response_details'])
except Exception, e:
self.log_error(e, trace=True)
@@ -63,13 +63,13 @@ class RapidgatorNet(Account):
self.log_debug("API:LOGIN", html)
- jso = json.loads(html)
+ json_data = json.loads(html)
- if jso['response_status'] is 200:
- data['sid'] = str(jso['response']['session_id'])
+ if json_data['response_status'] is 200:
+ data['sid'] = str(json_data['response']['session_id'])
return
else:
- self.log_error(jso['response_details'])
+ self.log_error(json_data['response_details'])
except Exception, e:
self.log_error(e, trace=True)
diff --git a/module/plugins/accounts/RapiduNet.py b/module/plugins/accounts/RapiduNet.py
index 985dd9b16..e9d16977d 100644
--- a/module/plugins/accounts/RapiduNet.py
+++ b/module/plugins/accounts/RapiduNet.py
@@ -53,14 +53,15 @@ class RapiduNet(Account):
post={'_go' : "",
'lang': "en"})
- jso = json.loads(self.load("https://rapidu.net/ajax.php",
- get={'a': "getUserLogin"},
- post={'_go' : "",
- 'login' : user,
- 'pass' : password,
- 'remember': "1"}))
+ html = self.load("https://rapidu.net/ajax.php",
+ get={'a': "getUserLogin"},
+ post={'_go' : "",
+ 'login' : user,
+ 'pass' : password,
+ 'remember': "1"})
+ json_data = json.loads(html)
- self.log_debug(jso)
+ self.log_debug(json_data)
- if jso['message'] != "success":
+ if json_data['message'] != "success":
self.fail_login()
diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py
index a1f6679b4..a6b9ba3be 100644
--- a/module/plugins/accounts/SmoozedCom.py
+++ b/module/plugins/accounts/SmoozedCom.py
@@ -83,6 +83,7 @@ class SmoozedCom(MultiAccount):
salt = hashlib.sha256(password).hexdigest()
encrypted = PBKDF2(password, salt, iterations=1000).hexread(32)
- return json.loads(self.load("http://www2.smoozed.com/api/login",
- get={'auth': user,
- 'password': encrypted}))
+ html = self.load("http://www2.smoozed.com/api/login",
+ get={'auth': user,
+ 'password': encrypted})
+ return json.loads(html)