summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/account/FastshareCz.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugin/account/FastshareCz.py')
-rw-r--r--pyload/plugin/account/FastshareCz.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/pyload/plugin/account/FastshareCz.py b/pyload/plugin/account/FastshareCz.py
index 8fe98438b..ce79e26ad 100644
--- a/pyload/plugin/account/FastshareCz.py
+++ b/pyload/plugin/account/FastshareCz.py
@@ -9,7 +9,7 @@ from pyload.utils import parseFileSize
class FastshareCz(Account):
__name__ = "FastshareCz"
__type__ = "account"
- __version__ = "0.05"
+ __version__ = "0.06"
__description__ = """Fastshare.cz account plugin"""
__license__ = "GPLv3"
@@ -17,13 +17,13 @@ class FastshareCz(Account):
("stickell", "l.stickell@yahoo.it")]
- CREDIT_PATTERN = r'My account\s*\((.+?)\)'
+ CREDIT_PATTERN = r'Credit\s*:\s*</td>\s*<td>(.+?)\s*<'
def loadAccountInfo(self, user, req):
- validuntil = None
+ validuntil = -1
trafficleft = None
- premium = None
+ premium = False
html = req.load("http://www.fastshare.cz/user", decode=True)
@@ -31,13 +31,11 @@ class FastshareCz(Account):
if m:
trafficleft = self.parseTraffic(m.group(1))
- if trafficleft:
- premium = True
- validuntil = -1
- else:
- premium = False
+ premium = bool(trafficleft)
- return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}
+ return {'validuntil' : validuntil,
+ 'trafficleft': trafficleft,
+ 'premium' : premium}
def login(self, user, data, req):