summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/accounts/FastshareCz.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/accounts/FastshareCz.py')
-rw-r--r--pyload/plugins/accounts/FastshareCz.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pyload/plugins/accounts/FastshareCz.py b/pyload/plugins/accounts/FastshareCz.py
index 69bbb0827..c047ff766 100644
--- a/pyload/plugins/accounts/FastshareCz.py
+++ b/pyload/plugins/accounts/FastshareCz.py
@@ -24,16 +24,18 @@ from module.utils import parseFileSize
class FastshareCz(Account):
__name__ = "FastshareCz"
- __version__ = "0.02"
+ __version__ = "0.03"
__type__ = "account"
__description__ = """fastshare.cz account plugin"""
__author_name__ = ("zoidberg", "stickell")
__author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it")
+ CREDIT_PATTERN = r'(?:Kredit|Credit)\s*</td>\s*<td[^>]*>([\d. \w]+)&nbsp;'
+
def loadAccountInfo(self, user, req):
html = req.load("http://www.fastshare.cz/user", decode=True)
- found = re.search(r'(?:Kredit|Credit)\s*: </td><td>(.+?)&nbsp;', html)
+ found = re.search(self.CREDIT_PATTERN, html)
if found:
trafficleft = parseFileSize(found.group(1)) / 1024
premium = True if trafficleft else False