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 | |
parent | RyushareCom: fixed #251 (diff) | |
download | pyload-97f07df02821e9d5a165cc749dfb3121e3436011.tar.xz |
Fastshare: fixed premium issue in #253
-rw-r--r-- | module/plugins/accounts/FastshareCz.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/FastshareCz.py | 4 |
2 files changed, 6 insertions, 4 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 diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py index 47ecda65a..844b8cd59 100644 --- a/module/plugins/hoster/FastshareCz.py +++ b/module/plugins/hoster/FastshareCz.py @@ -27,7 +27,7 @@ class FastshareCz(SimpleHoster): __name__ = "FastshareCz" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)?fastshare.cz/\d+/.+" - __version__ = "0.16" + __version__ = "0.17" __description__ = """FastShare.cz""" __author_name__ = ("zoidberg", "stickell") @@ -90,7 +90,7 @@ class FastshareCz(SimpleHoster): url = found.group(1) self.logDebug("PREMIUM URL: %s" % url) - self.download(url) + self.download(url, disposition=True) check = self.checkDownload({"credit": re.compile(self.NOT_ENOUGH_CREDIC_PATTERN)}) if check == "credit": |