From 48c0c42fd6faffc56432d5f037cd575979f180cc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 02:23:37 +0200 Subject: Removed all @author flags + key attributes cleanup for internal & hooks plugins --- module/plugins/accounts/NetloadIn.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'module/plugins/accounts/NetloadIn.py') diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py index 3d2b52470..2d88d7d3a 100755 --- a/module/plugins/accounts/NetloadIn.py +++ b/module/plugins/accounts/NetloadIn.py @@ -13,8 +13,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, see . - - @author: mkaay """ import re -- 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/NetloadIn.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/accounts/NetloadIn.py') diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py index 2d88d7d3a..7c5ea69f8 100755 --- a/module/plugins/accounts/NetloadIn.py +++ b/module/plugins/accounts/NetloadIn.py @@ -25,10 +25,12 @@ class NetloadIn(Account): __name__ = "NetloadIn" __version__ = "0.22" __type__ = "account" + __description__ = """Netload.in account plugin""" __author_name__ = ("RaNaN", "CryNickSystems") __author_mail__ = ("RaNaN@pyload.org", "webmaster@pcProfil.de") + def loadAccountInfo(self, user, req): page = req.load("http://netload.in/index.php?id=2&lang=de") left = r">(\d+) (Tag|Tage), (\d+) Stunden<" -- 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/NetloadIn.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'module/plugins/accounts/NetloadIn.py') diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py index 7c5ea69f8..12c5556fb 100755 --- a/module/plugins/accounts/NetloadIn.py +++ b/module/plugins/accounts/NetloadIn.py @@ -1,20 +1,5 @@ # -*- coding: utf-8 -*- -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . -""" - import re from time import time @@ -23,8 +8,8 @@ from module.plugins.Account import Account class NetloadIn(Account): __name__ = "NetloadIn" - __version__ = "0.22" __type__ = "account" + __version__ = "0.22" __description__ = """Netload.in account plugin""" __author_name__ = ("RaNaN", "CryNickSystems") -- 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/NetloadIn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/NetloadIn.py') diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py index 12c5556fb..1edcd3f2b 100755 --- a/module/plugins/accounts/NetloadIn.py +++ b/module/plugins/accounts/NetloadIn.py @@ -12,8 +12,8 @@ class NetloadIn(Account): __version__ = "0.22" __description__ = """Netload.in account plugin""" - __author_name__ = ("RaNaN", "CryNickSystems") - __author_mail__ = ("RaNaN@pyload.org", "webmaster@pcProfil.de") + __authors__ = [("RaNaN", "RaNaN@pyload.org"), + ("CryNickSystems", "webmaster@pcProfil.de")] 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/NetloadIn.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/NetloadIn.py') diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py index 1edcd3f2b..01d6f4476 100755 --- a/module/plugins/accounts/NetloadIn.py +++ b/module/plugins/accounts/NetloadIn.py @@ -12,6 +12,7 @@ class NetloadIn(Account): __version__ = "0.22" __description__ = """Netload.in account plugin""" + __license__ = "GPLv3" __authors__ = [("RaNaN", "RaNaN@pyload.org"), ("CryNickSystems", "webmaster@pcProfil.de")] -- cgit v1.2.3 From 8939f015a688a07ec7d0bd14b6a3704f6a2cb4a0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:12:40 +0200 Subject: Pattern update 3 --- module/plugins/accounts/NetloadIn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/NetloadIn.py') diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py index 01d6f4476..4bb4c7124 100755 --- a/module/plugins/accounts/NetloadIn.py +++ b/module/plugins/accounts/NetloadIn.py @@ -19,7 +19,7 @@ class NetloadIn(Account): def loadAccountInfo(self, user, req): page = req.load("http://netload.in/index.php?id=2&lang=de") - left = r">(\d+) (Tag|Tage), (\d+) Stunden<" + left = r'>(\d+) (Tag|Tage), (\d+) Stunden<' left = re.search(left, page) if left: validuntil = time() + int(left.group(1)) * 24 * 60 * 60 + int(left.group(3)) * 60 * 60 -- 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/NetloadIn.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/NetloadIn.py') diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py index 4bb4c7124..f5bac0368 100755 --- a/module/plugins/accounts/NetloadIn.py +++ b/module/plugins/accounts/NetloadIn.py @@ -31,6 +31,7 @@ class NetloadIn(Account): trafficleft = None return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium} + def login(self, user, data, req): page = req.load("http://netload.in/index.php", None, {"txtuser": user, "txtpass": data['password'], "txtcheck": "login", "txtlogin": "Login"}, -- 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/NetloadIn.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/accounts/NetloadIn.py') diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py index f5bac0368..be0b8632c 100755 --- a/module/plugins/accounts/NetloadIn.py +++ b/module/plugins/accounts/NetloadIn.py @@ -7,14 +7,14 @@ from module.plugins.Account import Account class NetloadIn(Account): - __name__ = "NetloadIn" - __type__ = "account" + __name__ = "NetloadIn" + __type__ = "account" __version__ = "0.22" __description__ = """Netload.in account plugin""" - __license__ = "GPLv3" - __authors__ = [("RaNaN", "RaNaN@pyload.org"), - ("CryNickSystems", "webmaster@pcProfil.de")] + __license__ = "GPLv3" + __authors__ = [("RaNaN", "RaNaN@pyload.org"), + ("CryNickSystems", "webmaster@pcProfil.de")] def loadAccountInfo(self, user, req): -- cgit v1.2.3 From 67587fbe0335cacfde28a86ba729b9d567ce1da7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 7 Dec 2014 00:27:18 +0100 Subject: Plugin code cosmetics (3) --- module/plugins/accounts/NetloadIn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/NetloadIn.py') diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py index be0b8632c..6565e6899 100755 --- a/module/plugins/accounts/NetloadIn.py +++ b/module/plugins/accounts/NetloadIn.py @@ -18,7 +18,7 @@ class NetloadIn(Account): def loadAccountInfo(self, user, req): - page = req.load("http://netload.in/index.php?id=2&lang=de") + page = req.load("http://netload.in/index.php", get={'id': 2, 'lang': "de"}) left = r'>(\d+) (Tag|Tage), (\d+) Stunden<' left = re.search(left, page) if left: -- 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/NetloadIn.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/NetloadIn.py') diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py index 6565e6899..15bad6966 100755 --- a/module/plugins/accounts/NetloadIn.py +++ b/module/plugins/accounts/NetloadIn.py @@ -18,9 +18,9 @@ class NetloadIn(Account): def loadAccountInfo(self, user, req): - page = req.load("http://netload.in/index.php", get={'id': 2, 'lang': "de"}) + html = req.load("http://netload.in/index.php", get={'id': 2, 'lang': "de"}) left = r'>(\d+) (Tag|Tage), (\d+) Stunden<' - left = re.search(left, page) + left = re.search(left, html) if left: validuntil = time() + int(left.group(1)) * 24 * 60 * 60 + int(left.group(3)) * 60 * 60 trafficleft = -1 @@ -33,8 +33,8 @@ class NetloadIn(Account): def login(self, user, data, req): - page = req.load("http://netload.in/index.php", None, + html = req.load("http://netload.in/index.php", None, {"txtuser": user, "txtpass": data['password'], "txtcheck": "login", "txtlogin": "Login"}, cookies=True) - if "password or it might be invalid!" in page: + if "password or it might be invalid!" in html: self.wrongPassword() -- cgit v1.2.3