From 049298dbdbff33918454b03a3b072f418d47af97 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 6 Jun 2015 05:33:38 +0200 Subject: Use SSL when login account --- module/plugins/accounts/OverLoadMe.py | 6 ++---- 1 file changed, 2 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 64d04aded..702637d3f 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -15,9 +15,8 @@ class OverLoadMe(Account): def loadAccountInfo(self, user, req): - https = "https" if self.getConfig('ssl') else "http" data = self.getAccountData(user) - html = req.load(https + "://api.over-load.me/account.php", + html = req.load("https://api.over-load.me/account.php", get={'user': user, 'auth': data['password']}).strip() @@ -32,8 +31,7 @@ class OverLoadMe(Account): def login(self, user, data, req): - https = "https" if self.getConfig('ssl') else "http" - jsondata = req.load(https + "://api.over-load.me/account.php", + jsondata = req.load("https://api.over-load.me/account.php", get={'user': user, 'auth': data['password']}).strip() -- cgit v1.2.3 From 0e1ef9bc01579328e17e79416fa3c1c7b77adcc8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 06:08:01 +0200 Subject: Update everything --- 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 702637d3f..82f4d9240 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- -from module.plugins.Account import Account +from module.plugins.internal.Account import Account from module.common.json_layer import json_loads class OverLoadMe(Account): __name__ = "OverLoadMe" __type__ = "account" - __version__ = "0.04" + __version__ = "0.05" __description__ = """Over-Load.me account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From c1764e2fea0bb05164c83a876e8cd58b97f58f25 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 16 Jun 2015 17:31:38 +0200 Subject: Update all --- module/plugins/accounts/OverLoadMe.py | 8 ++++---- 1 file changed, 4 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 82f4d9240..e7e1b71e1 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -16,9 +16,9 @@ class OverLoadMe(Account): def loadAccountInfo(self, user, req): data = self.getAccountData(user) - html = req.load("https://api.over-load.me/account.php", + html = self.load("https://api.over-load.me/account.php", get={'user': user, - 'auth': data['password']}).strip() + 'auth': data['password']}, req=req).strip() data = json_loads(html) self.logDebug(data) @@ -31,9 +31,9 @@ class OverLoadMe(Account): def login(self, user, data, req): - jsondata = req.load("https://api.over-load.me/account.php", + jsondata = self.load("https://api.over-load.me/account.php", get={'user': user, - 'auth': data['password']}).strip() + 'auth': data['password']}, req=req).strip() data = json_loads(jsondata) -- cgit v1.2.3 From 20b6a2ec022202b0efb6cb69415239fb8f4d1445 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:59:20 +0200 Subject: Spare code cosmetics (2) --- 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 e7e1b71e1..898c122cd 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -23,7 +23,7 @@ class OverLoadMe(Account): data = json_loads(html) self.logDebug(data) - # Check for premium + #: Check for premium if data['membership'] == "Free": return {'premium': False, 'validuntil': None, 'trafficleft': None} else: -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/accounts/OverLoadMe.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/accounts/OverLoadMe.py') diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index 898c122cd..d47a579f2 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -7,21 +7,21 @@ from module.common.json_layer import json_loads class OverLoadMe(Account): __name__ = "OverLoadMe" __type__ = "account" - __version__ = "0.05" + __version__ = "0.06" __description__ = """Over-Load.me account plugin""" __license__ = "GPLv3" __authors__ = [("marley", "marley@over-load.me")] - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) + def load_account_info(self, user, req): + data = self.get_account_data(user) html = self.load("https://api.over-load.me/account.php", get={'user': user, 'auth': data['password']}, req=req).strip() data = json_loads(html) - self.logDebug(data) + self.log_debug(data) #: Check for premium if data['membership'] == "Free": @@ -38,4 +38,4 @@ class OverLoadMe(Account): data = json_loads(jsondata) if data['err'] == 1: - self.wrongPassword() + self.wrong_password() -- cgit v1.2.3 From d2e2b127651a5a44b56337eb6d9ca246c97a208a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 17 Jul 2015 03:03:26 +0200 Subject: Spare fixes and code cosmetics --- module/plugins/accounts/OverLoadMe.py | 10 ++++++---- 1 file changed, 6 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 d47a579f2..22f2f4d9f 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -17,8 +17,9 @@ class OverLoadMe(Account): def load_account_info(self, user, req): data = self.get_account_data(user) html = self.load("https://api.over-load.me/account.php", - get={'user': user, - 'auth': data['password']}, req=req).strip() + get={'user': user, + 'auth': data['password']}, + req=req).strip() data = json_loads(html) self.log_debug(data) @@ -32,8 +33,9 @@ class OverLoadMe(Account): def login(self, user, data, req): jsondata = self.load("https://api.over-load.me/account.php", - get={'user': user, - 'auth': data['password']}, req=req).strip() + get={'user': user, + 'auth': data['password']}, + req=req).strip() data = json_loads(jsondata) -- cgit v1.2.3 From 1f5a55ae2133a782bdcca334ecbcdbde50dbcf99 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 17 Jul 2015 15:29:48 +0200 Subject: No more need to use the req argument when call load method --- module/plugins/accounts/OverLoadMe.py | 6 ++---- 1 file changed, 2 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 22f2f4d9f..b0e38c849 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -18,8 +18,7 @@ class OverLoadMe(Account): data = self.get_account_data(user) html = self.load("https://api.over-load.me/account.php", get={'user': user, - 'auth': data['password']}, - req=req).strip() + 'auth': data['password']}).strip() data = json_loads(html) self.log_debug(data) @@ -34,8 +33,7 @@ class OverLoadMe(Account): def login(self, user, data, req): jsondata = self.load("https://api.over-load.me/account.php", get={'user': user, - 'auth': data['password']}, - req=req).strip() + 'auth': data['password']}).strip() data = json_loads(jsondata) -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/accounts/OverLoadMe.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/OverLoadMe.py') diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index b0e38c849..8d3a2d1aa 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -8,6 +8,7 @@ class OverLoadMe(Account): __name__ = "OverLoadMe" __type__ = "account" __version__ = "0.06" + __status__ = "stable" __description__ = """Over-Load.me account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- 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 8d3a2d1aa..664b6543f 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -8,7 +8,7 @@ class OverLoadMe(Account): __name__ = "OverLoadMe" __type__ = "account" __version__ = "0.06" - __status__ = "stable" + __status__ = "testing" __description__ = """Over-Load.me account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 8f17f875f6e28f73ddb10da59c6464bd04922222 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Jul 2015 04:59:27 +0200 Subject: Account rewritten --- module/plugins/accounts/OverLoadMe.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/accounts/OverLoadMe.py') diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index 664b6543f..5e7625244 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -15,11 +15,11 @@ class OverLoadMe(Account): __authors__ = [("marley", "marley@over-load.me")] - def load_account_info(self, user, req): - data = self.get_account_data(user) + def parse_info(self, user, password, data, req): + data = self.get_data(user) html = self.load("https://api.over-load.me/account.php", get={'user': user, - 'auth': data['password']}).strip() + 'auth': password}).strip() data = json_loads(html) self.log_debug(data) @@ -31,12 +31,12 @@ class OverLoadMe(Account): return {'premium': True, 'validuntil': data['expirationunix'], 'trafficleft': -1} - def login(self, user, data, req): + def login(self, user, password, data, req): jsondata = self.load("https://api.over-load.me/account.php", get={'user': user, - 'auth': data['password']}).strip() + 'auth': password}).strip() data = json_loads(jsondata) if data['err'] == 1: - self.wrong_password() + self.fail() -- cgit v1.2.3 From a95c217627a1cb651b24e69f20640df40797aff9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Jul 2015 09:34:18 +0200 Subject: Account rewritten (2) --- 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 5e7625244..6741b674f 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -39,4 +39,4 @@ class OverLoadMe(Account): data = json_loads(jsondata) if data['err'] == 1: - self.fail() + self.login_fail() -- cgit v1.2.3