diff options
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/accounts/CatShareNet.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index 6fac87ecb..2552521e4 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -19,6 +19,7 @@ class CatShareNet(Account): PREMIUM_PATTERN = r'class="nav-collapse collapse pull-right">[\s\w<>=-."/:]*\sz.</a></li>\s*<li><a href="/premium">.*\s*<span style="color: red">(.*?)</span>[\s\w<>/]*href="/logout"' VALID_UNTIL_PATTERN = r'<div class="span6 pull-right">[\s\w<>=-":;]*<span style="font-size:13px;">.*?<strong>(.*?)</strong></span>' + TRAFFIC_PATTERN = r'<a href="/premium">([0-9.]+ [kMG]B)' def loadAccountInfo(self, user, req): @@ -40,7 +41,7 @@ class CatShareNet(Account): expiredate = m.group(1) if "-" not in expiredate: validuntil = mktime(strptime(expiredate, "%d.%m.%Y")) - m = re.search(r'<a href="/premium">([0-9.]+ [kMG]B)', html) + m = re.search(TRAFFIC_PATTERN, html) if m: trafficleft = int(self.parseTraffic(m.group(1))) except Exception: |