diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-26 19:39:20 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-26 19:39:20 +0100 |
commit | b20ffc3f6e6b34db2a22b6db6f751ee4a4d58a44 (patch) | |
tree | c7b01ea17f26b426ef40644113f7bde22f7eb0b6 /module/plugins/accounts/QuickshareCz.py | |
parent | [SimpleHoster][SimpleCrypter] Clean error method (diff) | |
download | pyload-b20ffc3f6e6b34db2a22b6db6f751ee4a4d58a44.tar.xz |
Assign in-line regex to PATTERN variable in a couple of accounts
Diffstat (limited to 'module/plugins/accounts/QuickshareCz.py')
-rw-r--r-- | module/plugins/accounts/QuickshareCz.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/module/plugins/accounts/QuickshareCz.py b/module/plugins/accounts/QuickshareCz.py index adb54c7d0..f8ba3e7ff 100644 --- a/module/plugins/accounts/QuickshareCz.py +++ b/module/plugins/accounts/QuickshareCz.py @@ -15,10 +15,13 @@ class QuickshareCz(Account): __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 = self.parseTraffic(m.group(1)) premium = True if trafficleft else False |