diff options
Diffstat (limited to 'pyload/plugins/account/QuickshareCz.py')
-rw-r--r-- | pyload/plugins/account/QuickshareCz.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/pyload/plugins/account/QuickshareCz.py b/pyload/plugins/account/QuickshareCz.py index 32d7f2d8e..18af5f736 100644 --- a/pyload/plugins/account/QuickshareCz.py +++ b/pyload/plugins/account/QuickshareCz.py @@ -1,25 +1,29 @@ # -*- coding: utf-8 -*- import re -from pyload.plugins.base.Account import Account -from pyload.utils import parseFileSize + +from module.plugins.Account import Account class QuickshareCz(Account): - __name__ = "QuickshareCz" - __type__ = "account" - __version__ = "0.01" + __name__ = "QuickshareCz" + __type__ = "account" + __version__ = "0.02" __description__ = """Quickshare.cz account plugin""" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + __license__ = "GPLv3" + __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + + + TRAFFIC_LEFT_PATTERN = r'Stav kreditu: <strong>(.+?)</strong>' def loadAccountInfo(self, user, req): html = req.load("http://www.quickshare.cz/premium", decode=True) - m = re.search(r'Stav kreditu: <strong>(.+?)</strong>', html) + m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: - trafficleft = parseFileSize(m.group(1)) / 1024 + trafficleft = self.parseTraffic(m.group(1)) premium = True if trafficleft else False else: trafficleft = None @@ -27,6 +31,7 @@ class QuickshareCz(Account): return {"validuntil": -1, "trafficleft": trafficleft, "premium": premium} + def login(self, user, data, req): html = req.load('http://www.quickshare.cz/html/prihlaseni_process.php', post={ "akce": u'Přihlásit', |