diff options
author | Stefano <l.stickell@yahoo.it> | 2013-09-13 17:41:24 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-09-13 17:41:24 +0200 |
commit | 97f07df02821e9d5a165cc749dfb3121e3436011 (patch) | |
tree | 352b66586bb2dfdaa5c5b1ac2f144c8984cc0676 /module/plugins/accounts | |
parent | RyushareCom: fixed #251 (diff) | |
download | pyload-97f07df02821e9d5a165cc749dfb3121e3436011.tar.xz |
Fastshare: fixed premium issue in #253
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/FastshareCz.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/module/plugins/accounts/FastshareCz.py b/module/plugins/accounts/FastshareCz.py index 69bbb0827..c047ff766 100644 --- a/module/plugins/accounts/FastshareCz.py +++ b/module/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]+) ' + def loadAccountInfo(self, user, req): html = req.load("http://www.fastshare.cz/user", decode=True) - found = re.search(r'(?:Kredit|Credit)\s*: </td><td>(.+?) ', html) + found = re.search(self.CREDIT_PATTERN, html) if found: trafficleft = parseFileSize(found.group(1)) / 1024 premium = True if trafficleft else False |