summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/SimplyPremiumCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts/SimplyPremiumCom.py')
-rw-r--r--module/plugins/accounts/SimplyPremiumCom.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py
index 133a96ec3..9de6ed55b 100644
--- a/module/plugins/accounts/SimplyPremiumCom.py
+++ b/module/plugins/accounts/SimplyPremiumCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Plugin import set_cookie
class SimplyPremiumCom(Account):
__name__ = "SimplyPremiumCom"
__type__ = "account"
- __version__ = "0.09"
+ __version__ = "0.10"
__status__ = "testing"
__description__ = """Simply-Premium.com account plugin"""
@@ -16,7 +16,16 @@ class SimplyPremiumCom(Account):
__authors__ = [("EvolutionClip", "evolutionclip@live.de")]
- def grab_info(self, user, password, data, req):
+ def grab_hosters(self, user, password, data):
+ json_data = self.load("http://www.simply-premium.com/api/hosts.php", get={'format': "json", 'online': 1})
+ json_data = json_loads(json_data)
+
+ host_list = [element['regex'] for element in json_data['result']]
+
+ return host_list
+
+
+ def grab_info(self, user, password, data):
premium = False
validuntil = -1
trafficleft = None
@@ -39,8 +48,8 @@ class SimplyPremiumCom(Account):
return {'premium': premium, 'validuntil': validuntil, 'trafficleft': trafficleft}
- def login(self, user, password, data, req):
- set_cookie(req.cj, "simply-premium.com", "lang", "EN")
+ def signin(self, user, password, data):
+ set_cookie(self.req.cj, "simply-premium.com", "lang", "EN")
html = self.load("https://www.simply-premium.com/login.php",
post={'key': user} if not password else {'login_name': user, 'login_pass': password})