diff options
author | jansohn <jansohn@users.noreply.github.com> | 2015-10-02 10:09:26 +0200 |
---|---|---|
committer | jansohn <jansohn@users.noreply.github.com> | 2015-10-02 10:09:26 +0200 |
commit | 3a08656c5665f4b8db98744fb323e64b8630e084 (patch) | |
tree | 28f9f62ffc57888b76ca32540dbf5af3a4cfc8d0 /module/plugins/accounts/ShareonlineBiz.py | |
parent | Merge pull request #1 from pyload/stable (diff) | |
parent | [Account] Improve parse_traffic method + code cosmetics (diff) | |
download | pyload-3a08656c5665f4b8db98744fb323e64b8630e084.tar.xz |
Merge pull request #2 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/accounts/ShareonlineBiz.py')
-rw-r--r-- | module/plugins/accounts/ShareonlineBiz.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py index 87bbc4632..f5d213ecd 100644 --- a/module/plugins/accounts/ShareonlineBiz.py +++ b/module/plugins/accounts/ShareonlineBiz.py @@ -9,7 +9,7 @@ from module.plugins.internal.Plugin import set_cookie class ShareonlineBiz(Account): __name__ = "ShareonlineBiz" __type__ = "account" - __version__ = "0.39" + __version__ = "0.41" __status__ = "testing" __description__ = """Share-online.biz account plugin""" @@ -17,7 +17,7 @@ class ShareonlineBiz(Account): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - def api_response(self, user, password, req): + def api_response(self, user, password): res = self.load("https://api.share-online.biz/cgi-bin", get={'q' : "userdetails", 'aux' : "traffic", @@ -30,21 +30,21 @@ class ShareonlineBiz(Account): api = dict(line.split("=") for line in res.splitlines() if "=" in line) if not 'a' in api: - self.login_fail(res.strip('*').strip()) + self.fail_login(res.strip('*')) if api['a'].lower() == "not_available": - self.login_fail(_("No info available")) + self.fail_login(_("No info available")) return api - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data): premium = False validuntil = None trafficleft = -1 maxtraffic = 100 * 1024 * 1024 * 1024 #: 100 GB - api = self.api_response(user, password, req) + api = self.api_response(user, password) premium = api['group'] in ("PrePaid", "Premium", "Penalty-Premium") validuntil = float(api['expire_date']) @@ -64,6 +64,6 @@ class ShareonlineBiz(Account): 'maxtraffic' : maxtraffic} - def login(self, user, password, data, req): - api = self.api_response(user, password, req) - set_cookie(req.cj, "share-online.biz", 'a', api['a']) + def signin(self, user, password, data): + api = self.api_response(user, password) + set_cookie(self.req.cj, "share-online.biz", 'a', api['a']) |