summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/WebshareCz.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-06-16 17:31:38 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-06-24 22:40:32 +0200
commitc1764e2fea0bb05164c83a876e8cd58b97f58f25 (patch)
treebe1af8dbf5542d93f1cb97f07dd1793fc7acc2df /module/plugins/accounts/WebshareCz.py
parent[SimpleHoster] fixurl (diff)
downloadpyload-c1764e2fea0bb05164c83a876e8cd58b97f58f25.tar.xz
Update all
Diffstat (limited to 'module/plugins/accounts/WebshareCz.py')
-rw-r--r--module/plugins/accounts/WebshareCz.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/module/plugins/accounts/WebshareCz.py b/module/plugins/accounts/WebshareCz.py
index c88e86aba..d0f5524a2 100644
--- a/module/plugins/accounts/WebshareCz.py
+++ b/module/plugins/accounts/WebshareCz.py
@@ -25,9 +25,8 @@ class WebshareCz(Account):
def loadAccountInfo(self, user, req):
- html = req.load("https://webshare.cz/api/user_data/",
- post={'wst': self.getAccountData(user).get('wst', None)},
- decode=True)
+ html = self.load("https://webshare.cz/api/user_data/",
+ post={'wst': self.getAccountData(user).get('wst', None)})
self.logDebug("Response: " + html)
@@ -42,10 +41,9 @@ class WebshareCz(Account):
def login(self, user, data, req):
- salt = req.load("https://webshare.cz/api/salt/",
+ salt = self.load("https://webshare.cz/api/salt/",
post={'username_or_email': user,
- 'wst' : ""},
- decode=True)
+ 'wst' : ""}, req=req)
if "<status>OK</status>" not in salt:
self.wrongPassword()
@@ -54,13 +52,12 @@ class WebshareCz(Account):
password = hashlib.sha1(md5_crypt.encrypt(data["password"], salt=salt)).hexdigest()
digest = hashlib.md5(user + ":Webshare:" + password).hexdigest()
- login = req.load("https://webshare.cz/api/login/",
+ login = self.load("https://webshare.cz/api/login/",
post={'digest' : digest,
'keep_logged_in' : 1,
'password' : password,
'username_or_email': user,
- 'wst' : ""},
- decode=True)
+ 'wst' : ""}, req=req)
if "<status>OK</status>" not in login:
self.wrongPassword()