summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-18 17:27:32 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-18 17:27:32 +0100
commit20ad288fbce13c553013dee2a674d8e362ee7a45 (patch)
tree671ccb1209f20318701c0ad2196f909b27ca1368 /module/plugins
parent[BasePlugin] Fix https://github.com/pyload/pyload/issues/1055 (diff)
downloadpyload-20ad288fbce13c553013dee2a674d8e362ee7a45.tar.xz
[CatShareNet] Update (2)
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/accounts/CatShareNet.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py
index dc1d6e372..ec4d706ae 100644
--- a/module/plugins/accounts/CatShareNet.py
+++ b/module/plugins/accounts/CatShareNet.py
@@ -10,15 +10,15 @@ from module.plugins.Account import Account
class CatShareNet(Account):
__name__ = "CatShareNet"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__description__ = """CatShareNet account plugin"""
__license__ = "GPLv3"
__authors__ = [("prOq", None)]
- 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>'
+ PREMIUM_PATTERN = r'<a href="/premium">Konto:[\s\n]*Premium'
+ VALID_UNTIL_PATTERN = r'>Konto premium.*?<strong>(.*?)</strong></span>'
TRAFFIC_LEFT_PATTERN = r'<a href="/premium">([0-9.]+ [kMG]B)'
@@ -29,12 +29,8 @@ class CatShareNet(Account):
html = req.load("http://catshare.net/", decode=True)
- try:
- if "Premium" in re.search(self.PREMIUM_PATTERN, html).group(1):
- premium = True
-
- except Exception:
- pass
+ if re.search(self.PREMIUM_PATTERN, html):
+ premium = True
try:
expiredate = re.search(self.VALID_UNTIL_PATTERN, html).group(1)