summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/CatShareNet.py
diff options
context:
space:
mode:
authorGravatar rukasuzu <lbaran80@gmail.com> 2015-01-18 13:58:38 +0100
committerGravatar rukasuzu <lbaran80@gmail.com> 2015-01-18 13:58:38 +0100
commit714ad63d204afe5ea4c26bed37182efa97c9f0a3 (patch)
treeee4844f82e69129f1db2e699ab84673418a4e170 /module/plugins/accounts/CatShareNet.py
parent[MultiHook] Fix reloadinterval (diff)
downloadpyload-714ad63d204afe5ea4c26bed37182efa97c9f0a3.tar.xz
[CatShareNet] Fixed patterns
Diffstat (limited to 'module/plugins/accounts/CatShareNet.py')
-rw-r--r--module/plugins/accounts/CatShareNet.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py
index 00bfadd09..00bea960d 100644
--- a/module/plugins/accounts/CatShareNet.py
+++ b/module/plugins/accounts/CatShareNet.py
@@ -17,8 +17,8 @@ class CatShareNet(Account):
__authors__ = [("prOq", None)]
- 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>'
+ PREMIUM_PATTERN = r'<li><a href="/premium">Konto:[\s\n]*(\w*)'
+ VALID_UNTIL_PATTERN = r'<span style="font-size:13px;">Konto premium.*?<strong>(.*?)</strong></span>'
TRAFFIC_LEFT_PATTERN = r'<a href="/premium">([0-9.]+ [kMG]B)'
@@ -40,13 +40,13 @@ class CatShareNet(Account):
expiredate = re.search(self.VALID_UNTIL_PATTERN, html).group(1)
self.logDebug("Expire date: " + expiredate)
- validuntil = mktime(strptime(expiredate, "%d.%m.%Y"))
+ validuntil = mktime(strptime(expiredate, "%Y-%m-%d %H:%M:%S"))
except Exception:
pass
try:
- trafficleft = self.parseTraffic(re.search(TRAFFIC_LEFT_PATTERN, html).group(1))
+ trafficleft = self.parseTraffic(re.search(self.TRAFFIC_LEFT_PATTERN, html).group(1))
except Exception:
pass