From c1764e2fea0bb05164c83a876e8cd58b97f58f25 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 16 Jun 2015 17:31:38 +0200 Subject: Update all --- module/plugins/accounts/WebshareCz.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'module/plugins/accounts/WebshareCz.py') 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 "OK" 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 "OK" not in login: self.wrongPassword() -- cgit v1.2.3