summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-18 18:52:10 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-18 18:52:10 +0200
commit21a0b9663af74c06b2a41a27b06c6fa3881f8a9b (patch)
treefd18af7948c3d8b83b5b1069f60fed8c7386cd58 /module
parent[Extractor] Code cleanup (diff)
downloadpyload-21a0b9663af74c06b2a41a27b06c6fa3881f8a9b.tar.xz
Update accounts
Diffstat (limited to 'module')
-rw-r--r--module/plugins/accounts/FilecloudIo.py6
-rw-r--r--module/plugins/accounts/FileserveCom.py6
-rw-r--r--module/plugins/accounts/LetitbitNet.py6
-rw-r--r--module/plugins/accounts/OboomCom.py4
-rw-r--r--module/plugins/accounts/RapidgatorNet.py24
-rw-r--r--module/plugins/accounts/RapiduNet.py8
-rw-r--r--module/plugins/accounts/UptoboxCom.py4
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()