From 97d25752691aa561c29a91166fdd30302bef2db2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 21 Sep 2015 00:54:03 +0200 Subject: [Account] parse_info -> grab_info --- module/plugins/accounts/WebshareCz.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts/WebshareCz.py') diff --git a/module/plugins/accounts/WebshareCz.py b/module/plugins/accounts/WebshareCz.py index bbfb90a92..f35300f52 100644 --- a/module/plugins/accounts/WebshareCz.py +++ b/module/plugins/accounts/WebshareCz.py @@ -25,7 +25,7 @@ class WebshareCz(Account): TRAFFIC_LEFT_PATTERN = r'(.+)' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): html = self.load("https://webshare.cz/api/user_data/", post={'wst': self.get_data(user).get('wst', None)}) @@ -47,7 +47,7 @@ class WebshareCz(Account): 'wst' : ""}) if "OK" not in salt: - self.login_fail() + self.fail_login() salt = re.search('(.+)', salt).group(1) password = hashlib.sha1(md5_crypt.encrypt(password, salt=salt)).hexdigest() @@ -61,6 +61,6 @@ class WebshareCz(Account): 'wst' : ""}) if "OK" not in login: - self.login_fail() + self.fail_login() data['wst'] = re.search('(.+)', login).group(1) -- cgit v1.2.3 From fb45ec44220201268f99b747831df717fa7a83f8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 21 Sep 2015 16:31:48 +0200 Subject: [Account] Fix __version__ --- module/plugins/accounts/WebshareCz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/WebshareCz.py') diff --git a/module/plugins/accounts/WebshareCz.py b/module/plugins/accounts/WebshareCz.py index f35300f52..33f851263 100644 --- a/module/plugins/accounts/WebshareCz.py +++ b/module/plugins/accounts/WebshareCz.py @@ -12,7 +12,7 @@ from module.plugins.internal.Account import Account class WebshareCz(Account): __name__ = "WebshareCz" __type__ = "account" - __version__ = "0.10" + __version__ = "0.11" __status__ = "testing" __description__ = """Webshare.cz account plugin""" -- cgit v1.2.3 From ec6e5dc7fcdcefee10e37d22473c9accae1104cf Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 29 Sep 2015 20:05:07 +0200 Subject: Account class completely rewritten + plugins updated --- module/plugins/accounts/WebshareCz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/WebshareCz.py') diff --git a/module/plugins/accounts/WebshareCz.py b/module/plugins/accounts/WebshareCz.py index 33f851263..484ea06ce 100644 --- a/module/plugins/accounts/WebshareCz.py +++ b/module/plugins/accounts/WebshareCz.py @@ -12,7 +12,7 @@ from module.plugins.internal.Account import Account class WebshareCz(Account): __name__ = "WebshareCz" __type__ = "account" - __version__ = "0.11" + __version__ = "0.12" __status__ = "testing" __description__ = """Webshare.cz account plugin""" @@ -25,9 +25,9 @@ class WebshareCz(Account): TRAFFIC_LEFT_PATTERN = r'(.+)' - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): html = self.load("https://webshare.cz/api/user_data/", - post={'wst': self.get_data(user).get('wst', None)}) + post={'wst': data.get('wst', None)}) self.log_debug("Response: " + html) @@ -41,7 +41,7 @@ class WebshareCz(Account): return {'validuntil': validuntil, 'trafficleft': -1, 'premium': premium} - def login(self, user, password, data, req): + def signin(self, user, password, data): salt = self.load("https://webshare.cz/api/salt/", post={'username_or_email': user, 'wst' : ""}) -- cgit v1.2.3