From 97d25752691aa561c29a91166fdd30302bef2db2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 21 Sep 2015 00:54:03 +0200 Subject: [Account] parse_info -> grab_info --- module/plugins/accounts/OverLoadMe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/OverLoadMe.py') diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index 6741b674f..f9f8b300d 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -15,7 +15,7 @@ class OverLoadMe(Account): __authors__ = [("marley", "marley@over-load.me")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): data = self.get_data(user) html = self.load("https://api.over-load.me/account.php", get={'user': user, @@ -39,4 +39,4 @@ class OverLoadMe(Account): data = json_loads(jsondata) if data['err'] == 1: - self.login_fail() + self.fail_login() -- cgit v1.2.3 From fb45ec44220201268f99b747831df717fa7a83f8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 21 Sep 2015 16:31:48 +0200 Subject: [Account] Fix __version__ --- module/plugins/accounts/OverLoadMe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/OverLoadMe.py') diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index f9f8b300d..cdb500767 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -7,7 +7,7 @@ from module.common.json_layer import json_loads class OverLoadMe(Account): __name__ = "OverLoadMe" __type__ = "account" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __description__ = """Over-Load.me account plugin""" -- cgit v1.2.3 From ec6e5dc7fcdcefee10e37d22473c9accae1104cf Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 29 Sep 2015 20:05:07 +0200 Subject: Account class completely rewritten + plugins updated --- module/plugins/accounts/OverLoadMe.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/OverLoadMe.py') diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index cdb500767..9a26ac368 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -7,7 +7,7 @@ from module.common.json_layer import json_loads class OverLoadMe(Account): __name__ = "OverLoadMe" __type__ = "account" - __version__ = "0.07" + __version__ = "0.08" __status__ = "testing" __description__ = """Over-Load.me account plugin""" @@ -15,8 +15,13 @@ class OverLoadMe(Account): __authors__ = [("marley", "marley@over-load.me")] - def grab_info(self, user, password, data, req): - data = self.get_data(user) + def grab_hosters(self, user, password, data): + html = self.load("https://api.over-load.me/hoster.php", + get={'auth': "0001-cb1f24dadb3aa487bda5afd3b76298935329be7700cd7-5329be77-00cf-1ca0135f"}).replace("\"", "").strip() + return [x.strip() for x in html.split(",") if x.strip()] + + + def grab_info(self, user, password, data): html = self.load("https://api.over-load.me/account.php", get={'user': user, 'auth': password}).strip() @@ -31,7 +36,7 @@ class OverLoadMe(Account): return {'premium': True, 'validuntil': data['expirationunix'], 'trafficleft': -1} - def login(self, user, password, data, req): + def signin(self, user, password, data): jsondata = self.load("https://api.over-load.me/account.php", get={'user': user, 'auth': password}).strip() -- cgit v1.2.3 From 3b3a4bd889286777ba6a590a1f74cf3edae36a72 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 30 Sep 2015 00:30:53 +0200 Subject: Add __config__ to MultiAccount (and XFSAccount) based plugins --- module/plugins/accounts/OverLoadMe.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'module/plugins/accounts/OverLoadMe.py') diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index 9a26ac368..60dddeb5a 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -10,6 +10,10 @@ class OverLoadMe(Account): __version__ = "0.08" __status__ = "testing" + __config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"), + ("mh_list" , "str" , "Hoster list (comma separated)", "" ), + ("mh_interval", "int" , "Reload interval in minutes" , 60 )] + __description__ = """Over-Load.me account plugin""" __license__ = "GPLv3" __authors__ = [("marley", "marley@over-load.me")] -- cgit v1.2.3 From 25d5726d4953b93a2e286fd6af8d4ead20670ba6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 1 Oct 2015 04:55:17 +0200 Subject: A lot of plugin code cosmetics --- module/plugins/accounts/OverLoadMe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/OverLoadMe.py') diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index 60dddeb5a..02d0d2649 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -21,8 +21,8 @@ class OverLoadMe(Account): def grab_hosters(self, user, password, data): html = self.load("https://api.over-load.me/hoster.php", - get={'auth': "0001-cb1f24dadb3aa487bda5afd3b76298935329be7700cd7-5329be77-00cf-1ca0135f"}).replace("\"", "").strip() - return [x.strip() for x in html.split(",") if x.strip()] + get={'auth': "0001-cb1f24dadb3aa487bda5afd3b76298935329be7700cd7-5329be77-00cf-1ca0135f"}) + return [x for x in map(str.strip, html.replace("\"", "").split(",")) if x] def grab_info(self, user, password, data): -- cgit v1.2.3