diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-27 21:13:09 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-27 21:13:09 +0100 |
commit | 27f0f486bb859d25c49916d4131f882e1b5ba8dc (patch) | |
tree | ea7993f3accc32e2d36bfc992695d27197936835 | |
parent | [ZippyshareCom] Fix get_checksum routine (diff) | |
download | pyload-27f0f486bb859d25c49916d4131f882e1b5ba8dc.tar.xz |
[ShareonlineBiz] Account fixup
-rw-r--r-- | module/plugins/accounts/ShareonlineBiz.py | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py index 056f14876..3f737896e 100644 --- a/module/plugins/accounts/ShareonlineBiz.py +++ b/module/plugins/accounts/ShareonlineBiz.py @@ -1,18 +1,18 @@ # -*- coding: utf-8 -*- +import re + from module.plugins.Account import Account class ShareonlineBiz(Account): __name__ = "ShareonlineBiz" __type__ = "account" - __version__ = "0.27" + __version__ = "0.28" __description__ = """Share-online.biz account plugin""" __license__ = "GPLv3" - __authors__ = [("mkaay", "mkaay@mkaay.de"), - ("zoidberg", "zoidberg@mujmail.cz"), - ("Walter Purcaro", "vuolter@gmail.com")] + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] def api_response(self, user, req): @@ -34,21 +34,13 @@ class ShareonlineBiz(Account): self.logDebug(api) - for key in ("dl", "a"): - if key not in api: - continue - - if api['group'] != "Sammler": - premium = True + if api['a'].lower() != "not_available": + req.cj.setCookie("share-online.biz", 'a', api['a']) - if api[key].lower() != "not_available": - req.cj.setCookie("share-online.biz", key, api[key]) - break + premium = api['group'] == "Premium" - if 'expire_date' in api: validuntil = float(api['expire_date']) - if 'traffic_1d' in api: traffic = float(api['traffic_1d'].split(";")[0]) maxtraffic = max(maxtraffic, traffic) trafficleft = maxtraffic - traffic @@ -58,7 +50,7 @@ class ShareonlineBiz(Account): def login(self, user, data, req): html = self.api_response(user, req) - err = re.search(r'**(.+?)**', html) + err = re.search(r'\*\*(.+?)\*\*', html) if err: self.logError(err.group(1)) self.wrongPassword() |