diff options
Diffstat (limited to 'module/plugins/accounts/WebshareCz.py')
-rw-r--r-- | module/plugins/accounts/WebshareCz.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/accounts/WebshareCz.py b/module/plugins/accounts/WebshareCz.py index bbfb90a92..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.10" + __version__ = "0.12" __status__ = "testing" __description__ = """Webshare.cz account plugin""" @@ -25,9 +25,9 @@ class WebshareCz(Account): TRAFFIC_LEFT_PATTERN = r'<bytes>(.+)</bytes>' - def parse_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,13 +41,13 @@ 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' : ""}) if "<status>OK</status>" not in salt: - self.login_fail() + self.fail_login() salt = re.search('<salt>(.+)</salt>', salt).group(1) password = hashlib.sha1(md5_crypt.encrypt(password, salt=salt)).hexdigest() @@ -61,6 +61,6 @@ class WebshareCz(Account): 'wst' : ""}) if "<status>OK</status>" not in login: - self.login_fail() + self.fail_login() data['wst'] = re.search('<token>(.+)</token>', login).group(1) |