diff options
-rw-r--r-- | module/plugins/accounts/FilecloudIo.py | 6 | ||||
-rw-r--r-- | module/plugins/accounts/FileserveCom.py | 6 | ||||
-rw-r--r-- | module/plugins/accounts/LetitbitNet.py | 6 | ||||
-rw-r--r-- | module/plugins/accounts/OboomCom.py | 4 | ||||
-rw-r--r-- | module/plugins/accounts/RapidgatorNet.py | 24 | ||||
-rw-r--r-- | module/plugins/accounts/RapiduNet.py | 8 | ||||
-rw-r--r-- | module/plugins/accounts/UptoboxCom.py | 4 |
7 files changed, 29 insertions, 29 deletions
diff --git a/module/plugins/accounts/FilecloudIo.py b/module/plugins/accounts/FilecloudIo.py index d80a8b9d6..de1636520 100644 --- a/module/plugins/accounts/FilecloudIo.py +++ b/module/plugins/accounts/FilecloudIo.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.common.json_layer import json_loads +from module.plugins.internal.utils import json from module.plugins.internal.Account import Account from module.plugins.internal.Plugin import set_cookie @@ -22,7 +22,7 @@ class FilecloudIo(Account): for _i in xrange(5): rep = self.load("https://secure.filecloud.io/api-fetch_apikey.api", post={'username': user, 'password': password}) - rep = json_loads(rep) + rep = json.loads(rep) if rep['status'] == "ok": break elif rep['status'] == "error" and rep['message'] == "no such user or wrong password": @@ -35,7 +35,7 @@ class FilecloudIo(Account): self.accounts[user]['akey'] = akey #: Saved for hoster plugin rep = self.load("http://api.filecloud.io/api-fetch_account_details.api", post={'akey': akey}) - rep = json_loads(rep) + rep = json.loads(rep) if rep['is_premium'] == 1: return {'validuntil': float(rep['premium_until']), 'trafficleft': -1} diff --git a/module/plugins/accounts/FileserveCom.py b/module/plugins/accounts/FileserveCom.py index bc56d4b96..0ba5ca699 100644 --- a/module/plugins/accounts/FileserveCom.py +++ b/module/plugins/accounts/FileserveCom.py @@ -3,7 +3,7 @@ import time from module.plugins.internal.Account import Account -from module.common.json_layer import json_loads +from module.plugins.internal.utils import json class FileserveCom(Account): @@ -22,7 +22,7 @@ class FileserveCom(Account): post={'username': user, 'password': password, 'submit': "Submit+Query"}) - res = json_loads(html) + res = json.loads(html) if res['type'] == "premium": validuntil = time.mktime(time.strptime(res['expireTime'], "%Y-%m-%d %H:%M:%S")) @@ -36,7 +36,7 @@ class FileserveCom(Account): post={'username': user, 'password': password, 'submit' : "Submit+Query"}) - res = json_loads(html) + res = json.loads(html) if not res['type']: self.fail_login() diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index f7350e547..e5e4f7ae4 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from module.plugins.internal.Account import Account -# from module.common.json_layer import json_loads, json_dumps +# from module.plugins.internal.utils import json class LetitbitNet(Account): @@ -19,9 +19,9 @@ class LetitbitNet(Account): ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## # json_data = [password, ['key/info']] # api_rep = self.load("http://api.letitbit.net/json", - # post={'r': json_dumps(json_data)}) + # post={'r': json.dumps(json_data)}) # self.log_debug("API Key Info: " + api_rep) - # api_rep = json_loads(api_rep) + # api_rep = json.loads(api_rep) # # if api_rep['status'] == "FAIL": # self.log_warning(api_rep['data']) diff --git a/module/plugins/accounts/OboomCom.py b/module/plugins/accounts/OboomCom.py index c19396854..a156ffb1d 100644 --- a/module/plugins/accounts/OboomCom.py +++ b/module/plugins/accounts/OboomCom.py @@ -16,7 +16,7 @@ except ImportError: def hexread(self, octets): return b2a_hex(pbkdf2(self.passphrase, self.salt, self.iterations, octets)) -from module.common.json_layer import json_loads +from module.plugins.internal.utils import json from module.plugins.internal.Account import Account @@ -35,7 +35,7 @@ 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 + result = json.loads(self.load("http://www.oboom.com/1/login", #@TODO: Revert to `https` in 0.4.10 get={'auth': user, 'pass': pbkdf2})) diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py index 9c37f6212..851ce5b09 100644 --- a/module/plugins/accounts/RapidgatorNet.py +++ b/module/plugins/accounts/RapidgatorNet.py @@ -3,7 +3,7 @@ import urlparse from module.plugins.internal.Account import Account -from module.common.json_layer import json_loads +from module.plugins.internal.utils import jso class RapidgatorNet(Account): @@ -34,17 +34,17 @@ class RapidgatorNet(Account): self.log_debug("API:USERINFO", html) - json = json_loads(html) + jso = json.loads(html) - if json['response_status'] == 200: - if "reset_in" in json['response']: - self._schedule_refresh(user, json['response']['reset_in']) + if jso['response_status'] == 200: + if "reset_in" in jso['response']: + self._schedule_refresh(user, jso['response']['reset_in']) - validuntil = json['response']['expire_date'] - trafficleft = float(json['response']['traffic_left']) / 1024 #@TODO: Remove `/ 1024` in 0.4.10 + validuntil = jso['response']['expire_date'] + trafficleft = float(jso['response']['traffic_left']) / 1024 #@TODO: Remove `/ 1024` in 0.4.10 premium = True else: - self.log_error(json['response_details']) + self.log_error(jso['response_details']) except Exception, e: self.log_error(e, trace=True) @@ -63,13 +63,13 @@ class RapidgatorNet(Account): self.log_debug("API:LOGIN", html) - json = json_loads(html) + jso = json.loads(html) - if json['response_status'] == 200: - data['sid'] = str(json['response']['session_id']) + if jso['response_status'] == 200: + data['sid'] = str(jso['response']['session_id']) return else: - self.log_error(json['response_details']) + self.log_error(jso['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 c11eb9214..d04d924a3 100644 --- a/module/plugins/accounts/RapiduNet.py +++ b/module/plugins/accounts/RapiduNet.py @@ -4,7 +4,7 @@ import re import time from module.plugins.internal.Account import Account -from module.common.json_layer import json_loads +from module.plugins.internal.utils import json class RapiduNet(Account): @@ -53,14 +53,14 @@ class RapiduNet(Account): post={'_go' : "", 'lang': "en"}) - json = json_loads(self.load("https://rapidu.net/ajax.php", + jso = json.loads(self.load("https://rapidu.net/ajax.php", get={'a': "getUserLogin"}, post={'_go' : "", 'login' : user, 'pass' : password, 'remember': "1"})) - self.log_debug(json) + self.log_debug(jso) - if json['message'] != "success": + if jso['message'] != "success": self.fail_login() diff --git a/module/plugins/accounts/UptoboxCom.py b/module/plugins/accounts/UptoboxCom.py index bdd037af8..6eb2314b1 100644 --- a/module/plugins/accounts/UptoboxCom.py +++ b/module/plugins/accounts/UptoboxCom.py @@ -3,7 +3,7 @@ import re import urlparse -from module.common.json_layer import json_loads +from module.plugins.internal.utils import json from module.plugins.internal.XFSAccount import XFSAccount @@ -39,5 +39,5 @@ class UptoboxCom(XFSAccount): 'password': password}, cookies=self.COOKIES) - if json_loads(html).get('error'): + if json.loads(html).get('error'): self.fail_login() |