diff options
Diffstat (limited to 'module/plugins/accounts/CzshareCom.py')
-rw-r--r-- | module/plugins/accounts/CzshareCom.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/accounts/CzshareCom.py b/module/plugins/accounts/CzshareCom.py index e9a34cb83..209a94f60 100644 --- a/module/plugins/accounts/CzshareCom.py +++ b/module/plugins/accounts/CzshareCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class CzshareCom(Account): __name__ = "CzshareCom" __type__ = "account" - __version__ = "0.20" + __version__ = "0.23" __status__ = "testing" __description__ = """Czshare.com account plugin, now Sdilej.cz""" @@ -21,7 +21,7 @@ class CzshareCom(Account): CREDIT_LEFT_PATTERN = r'<tr class="active">\s*<td>([\d ,]+) (KiB|MiB|GiB)</td>\s*<td>([^<]*)</td>\s*</tr>' - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data): premium = False validuntil = None trafficleft = None @@ -30,7 +30,7 @@ class CzshareCom(Account): try: m = re.search(self.CREDIT_LEFT_PATTERN, html) - trafficleft = self.parse_traffic(m.group(1).replace(' ', '').replace(',', '.')) + m.group(2) + trafficleft = self.parse_traffic(m.group(1), m.group(2) validuntil = time.mktime(time.strptime(m.group(3), '%d.%m.%y %H:%M')) except Exception, e: @@ -44,11 +44,11 @@ class CzshareCom(Account): 'trafficleft': trafficleft} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load('https://sdilej.cz/index.php', post={'Prihlasit' : "Prihlasit", "login-password": password, "login-name" : user}) if '<div class="login' in html: - self.login_fail() + self.fail_login() |