summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
authorGravatar rukasuzu <lbaran80@gmail.com> 2015-01-17 20:10:51 +0100
committerGravatar rukasuzu <lbaran80@gmail.com> 2015-01-17 20:10:51 +0100
commit288ad3aeb2e2b16d6b3acc9c277c980531f275bc (patch)
treee6156472c47eec1d6bbca06d559f1a6f8dcd87a6 /module/plugins/accounts
parent[CatShareNet] Added traffic left info (diff)
downloadpyload-288ad3aeb2e2b16d6b3acc9c277c980531f275bc.tar.xz
[CatShareNet] Added traffic left info
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/CatShareNet.py3
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: