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/Premium4Me.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/Premium4Me.py') diff --git a/module/plugins/accounts/Premium4Me.py b/module/plugins/accounts/Premium4Me.py index c80f40f5c..0da442da6 100644 --- a/module/plugins/accounts/Premium4Me.py +++ b/module/plugins/accounts/Premium4Me.py @@ -21,7 +21,7 @@ class Premium4Me(Account): def login(self, user, data, req): self.authcode = req.load("http://premium.to/api/getauthcode.php?username=%s&password=%s" % ( - user, data["password"])).strip() + user, data['password'])).strip() if "wrong username" in self.authcode: 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/Premium4Me.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/accounts/Premium4Me.py') diff --git a/module/plugins/accounts/Premium4Me.py b/module/plugins/accounts/Premium4Me.py index 0da442da6..9eab6f81f 100644 --- a/module/plugins/accounts/Premium4Me.py +++ b/module/plugins/accounts/Premium4Me.py @@ -7,10 +7,12 @@ class Premium4Me(Account): __name__ = "Premium4Me" __version__ = "0.03" __type__ = "account" + __description__ = """Premium.to account plugin""" __author_name__ = ("RaNaN", "zoidberg", "stickell") __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz", "l.stickell@yahoo.it") + def loadAccountInfo(self, user, req): traffic = req.load("http://premium.to/api/traffic.php?authcode=%s" % self.authcode) -- 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/Premium4Me.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/Premium4Me.py') diff --git a/module/plugins/accounts/Premium4Me.py b/module/plugins/accounts/Premium4Me.py index 9eab6f81f..9f66af414 100644 --- a/module/plugins/accounts/Premium4Me.py +++ b/module/plugins/accounts/Premium4Me.py @@ -5,8 +5,8 @@ from module.plugins.Account import Account class Premium4Me(Account): __name__ = "Premium4Me" - __version__ = "0.03" __type__ = "account" + __version__ = "0.03" __description__ = """Premium.to account plugin""" __author_name__ = ("RaNaN", "zoidberg", "stickell") -- cgit v1.2.3 From a64c0d41a27da58dc004f97bc934c8b3018a1de9 Mon Sep 17 00:00:00 2001 From: stickell Date: Fri, 12 Sep 2014 17:54:39 +0200 Subject: [Premium4Me] Renamed to PremiumTo + partial rewrite + special traffic support --- module/plugins/accounts/Premium4Me.py | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 module/plugins/accounts/Premium4Me.py (limited to 'module/plugins/accounts/Premium4Me.py') diff --git a/module/plugins/accounts/Premium4Me.py b/module/plugins/accounts/Premium4Me.py deleted file mode 100644 index 9f66af414..000000000 --- a/module/plugins/accounts/Premium4Me.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.plugins.Account import Account - - -class Premium4Me(Account): - __name__ = "Premium4Me" - __type__ = "account" - __version__ = "0.03" - - __description__ = """Premium.to account plugin""" - __author_name__ = ("RaNaN", "zoidberg", "stickell") - __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz", "l.stickell@yahoo.it") - - - def loadAccountInfo(self, user, req): - traffic = req.load("http://premium.to/api/traffic.php?authcode=%s" % self.authcode) - - account_info = {"trafficleft": int(traffic) / 1024, - "validuntil": -1} - - return account_info - - def login(self, user, data, req): - self.authcode = req.load("http://premium.to/api/getauthcode.php?username=%s&password=%s" % ( - user, data['password'])).strip() - - if "wrong username" in self.authcode: - self.wrongPassword() -- cgit v1.2.3