From 7b8c458cca7d21a029620f98e453f746fce69cd1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 16:10:01 +0200 Subject: Prefer single quote for dict key name --- 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 eab20480f..7c57fc88c 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -14,20 +14,20 @@ class OverLoadMe(Account): def loadAccountInfo(self, user, req): data = self.getAccountData(user) - page = req.load("https://api.over-load.me/account.php", get={"user": user, "auth": data["password"]}).strip() + page = req.load("https://api.over-load.me/account.php", get={"user": user, "auth": data['password']}).strip() data = json_loads(page) # Check for premium - if data["membership"] == "Free": + if data['membership'] == "Free": return {"premium": False} - account_info = {"validuntil": data["expirationunix"], "trafficleft": -1} + account_info = {"validuntil": data['expirationunix'], "trafficleft": -1} return account_info def login(self, user, data, req): jsondata = req.load("https://api.over-load.me/account.php", - get={"user": user, "auth": data["password"]}).strip() + get={"user": user, "auth": data['password']}).strip() data = json_loads(jsondata) - if data["err"] == 1: + if data['err'] == 1: self.wrongPassword() -- cgit v1.2.3 From 8e47b0de30a25d0fd5dfb518bfe4e1e7beff93fd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:27:44 +0200 Subject: Key attributes cleanup for account, container and crypter plugins --- module/plugins/accounts/OverLoadMe.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/accounts/OverLoadMe.py') diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index 7c57fc88c..129074a0f 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -8,10 +8,12 @@ class OverLoadMe(Account): __name__ = "OverLoadMe" __version__ = "0.01" __type__ = "account" + __description__ = """Over-Load.me account plugin""" __author_name__ = "marley" __author_mail__ = "marley@over-load.me" + def loadAccountInfo(self, user, req): data = self.getAccountData(user) page = req.load("https://api.over-load.me/account.php", get={"user": user, "auth": data['password']}).strip() -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- 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 129074a0f..34f684cb1 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -6,8 +6,8 @@ from module.common.json_layer import json_loads class OverLoadMe(Account): __name__ = "OverLoadMe" - __version__ = "0.01" __type__ = "account" + __version__ = "0.01" __description__ = """Over-Load.me account plugin""" __author_name__ = "marley" -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/accounts/OverLoadMe.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/accounts/OverLoadMe.py') diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index 34f684cb1..e45f0127b 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -10,8 +10,7 @@ class OverLoadMe(Account): __version__ = "0.01" __description__ = """Over-Load.me account plugin""" - __author_name__ = "marley" - __author_mail__ = "marley@over-load.me" + __authors__ = [("marley", "marley@over-load.me")] def loadAccountInfo(self, user, req): -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- 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 e45f0127b..1d0bf3321 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -10,6 +10,7 @@ class OverLoadMe(Account): __version__ = "0.01" __description__ = """Over-Load.me account plugin""" + __license__ = "GPLv3" __authors__ = [("marley", "marley@over-load.me")] -- cgit v1.2.3 From 6a0fb7fdd4ea2749be44625225d8a235a78f032f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:42:39 +0200 Subject: [accounts] Code cosmetics --- 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 1d0bf3321..c85feec59 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -26,6 +26,7 @@ class OverLoadMe(Account): account_info = {"validuntil": data['expirationunix'], "trafficleft": -1} return account_info + def login(self, user, data, req): jsondata = req.load("https://api.over-load.me/account.php", get={"user": user, "auth": data['password']}).strip() -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- 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 c85feec59..7df4c9aef 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -5,13 +5,13 @@ from module.common.json_layer import json_loads class OverLoadMe(Account): - __name__ = "OverLoadMe" - __type__ = "account" + __name__ = "OverLoadMe" + __type__ = "account" __version__ = "0.01" __description__ = """Over-Load.me account plugin""" - __license__ = "GPLv3" - __authors__ = [("marley", "marley@over-load.me")] + __license__ = "GPLv3" + __authors__ = [("marley", "marley@over-load.me")] def loadAccountInfo(self, user, req): -- cgit v1.2.3 From fb65d5354c3cc80c3f48c3a2745b8dc01105edfd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 18 Dec 2014 16:02:29 +0100 Subject: Update account plugins --- 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 7df4c9aef..fb9732986 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -16,8 +16,8 @@ class OverLoadMe(Account): def loadAccountInfo(self, user, req): data = self.getAccountData(user) - page = req.load("https://api.over-load.me/account.php", get={"user": user, "auth": data['password']}).strip() - data = json_loads(page) + html = req.load("https://api.over-load.me/account.php", get={"user": user, "auth": data['password']}).strip() + data = json_loads(html) # Check for premium if data['membership'] == "Free": -- cgit v1.2.3