summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/ShareonlineBiz.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts/ShareonlineBiz.py')
-rw-r--r--module/plugins/accounts/ShareonlineBiz.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py
index b9ff0096c..976d2ff14 100644
--- a/module/plugins/accounts/ShareonlineBiz.py
+++ b/module/plugins/accounts/ShareonlineBiz.py
@@ -4,24 +4,26 @@ from module.plugins.Account import Account
class ShareonlineBiz(Account):
- __name__ = "ShareonlineBiz"
- __type__ = "account"
+ __name__ = "ShareonlineBiz"
+ __type__ = "account"
__version__ = "0.24"
__description__ = """Share-online.biz account plugin"""
- __author_name__ = ("mkaay", "zoidberg")
- __author_mail__ = ("mkaay@mkaay.de", "zoidberg@mujmail.cz")
+ __license__ = "GPLv3"
+ __authors__ = [("mkaay", "mkaay@mkaay.de"),
+ ("zoidberg", "zoidberg@mujmail.cz")]
def getUserAPI(self, user, req):
return req.load("http://api.share-online.biz/account.php",
{"username": user, "password": self.accounts[user]['password'], "act": "userDetails"})
+
def loadAccountInfo(self, user, req):
- src = self.getUserAPI(user, req)
+ html = self.getUserAPI(user, req)
info = {}
- for line in src.splitlines():
+ for line in html.splitlines():
if "=" in line:
key, value = line.split("=")
info[key] = value
@@ -36,7 +38,8 @@ class ShareonlineBiz(Account):
"trafficleft": -1,
"premium": True if ("dl" in info or "a" in info) and (info['group'] != "Sammler") else False}
+
def login(self, user, data, req):
- src = self.getUserAPI(user, req)
- if "EXCEPTION" in src:
+ html = self.getUserAPI(user, req)
+ if "EXCEPTION" in html:
self.wrongPassword()