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/FourSharedCom.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'module/plugins/accounts/FourSharedCom.py') diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index 869705313..c901a4d5c 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.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: zoidberg """ from module.plugins.Account import Account -- 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/FourSharedCom.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/accounts/FourSharedCom.py') diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index c901a4d5c..b8a0c33f6 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -23,10 +23,12 @@ class FourSharedCom(Account): __name__ = "FourSharedCom" __version__ = "0.01" __type__ = "account" + __description__ = """FourShared.com account plugin""" __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" + def loadAccountInfo(self, user, req): #fixme return {"validuntil": -1, "trafficleft": -1, "premium": False} -- 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/FourSharedCom.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'module/plugins/accounts/FourSharedCom.py') diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index b8a0c33f6..206edca23 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -1,28 +1,13 @@ # -*- 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 . -""" - from module.plugins.Account import Account from module.common.json_layer import json_loads class FourSharedCom(Account): __name__ = "FourSharedCom" - __version__ = "0.01" __type__ = "account" + __version__ = "0.01" __description__ = """FourShared.com account plugin""" __author_name__ = "zoidberg" -- cgit v1.2.3 From a430d250a8e4d84a262b546fa42e6d97a909146b Mon Sep 17 00:00:00 2001 From: stickell Date: Fri, 12 Sep 2014 18:02:58 +0200 Subject: [4shared] Fixed login sequence --- module/plugins/accounts/FourSharedCom.py | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'module/plugins/accounts/FourSharedCom.py') diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index 206edca23..5e37e54f3 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -7,28 +7,23 @@ from module.common.json_layer import json_loads class FourSharedCom(Account): __name__ = "FourSharedCom" __type__ = "account" - __version__ = "0.01" - + __version__ = "0.03" __description__ = """FourShared.com account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - + __author_name__ = ("zoidberg", "stickell") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") def loadAccountInfo(self, user, req): - #fixme - return {"validuntil": -1, "trafficleft": -1, "premium": False} + # Free mode only for now + return {"premium": False} def login(self, user, data, req): - req.cj.setCookie("www.4shared.com", "4langcookie", "en") - response = req.load('http://www.4shared.com/login', + req.cj.setCookie("4shared.com", "4langcookie", "en") + response = req.load('http://www.4shared.com/web/login', post={"login": user, "password": data['password'], - "remember": "false", - "doNotRedirect": "true"}) - self.logDebug(response) - response = json_loads(response) + "remember": "on", + "_remember": "on", + "returnTo": "http://www.4shared.com/account/home.jsp"}) - if not "ok" in response or response['ok'] != True: - if "rejectReason" in response and response['rejectReason'] != True: - self.logError(response['rejectReason']) + if 'Please log in to access your 4shared account' in response: self.wrongPassword() -- 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/FourSharedCom.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/FourSharedCom.py') diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index 5e37e54f3..303185c6d 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -9,8 +9,9 @@ class FourSharedCom(Account): __type__ = "account" __version__ = "0.03" __description__ = """FourShared.com account plugin""" - __author_name__ = ("zoidberg", "stickell") - __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") + __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), + ("stickell", "l.stickell@yahoo.it")] + def loadAccountInfo(self, user, req): # Free mode only for now -- 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/FourSharedCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/FourSharedCom.py') diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index 303185c6d..cd32fbca9 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -9,6 +9,7 @@ class FourSharedCom(Account): __type__ = "account" __version__ = "0.03" __description__ = """FourShared.com account plugin""" + __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), ("stickell", "l.stickell@yahoo.it")] -- cgit v1.2.3 From 332c248d0860c8c09d804055b6491dfbb654c8d3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:25:22 +0200 Subject: Newline cosmetics --- module/plugins/accounts/FourSharedCom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module/plugins/accounts/FourSharedCom.py') diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index cd32fbca9..39f6fbe75 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -1,13 +1,14 @@ # -*- coding: utf-8 -*- -from module.plugins.Account import Account from module.common.json_layer import json_loads +from module.plugins.Account import Account class FourSharedCom(Account): __name__ = "FourSharedCom" __type__ = "account" __version__ = "0.03" + __description__ = """FourShared.com account plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), -- 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/FourSharedCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/FourSharedCom.py') diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index 39f6fbe75..21aff591b 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -19,6 +19,7 @@ class FourSharedCom(Account): # Free mode only for now return {"premium": False} + def login(self, user, data, req): req.cj.setCookie("4shared.com", "4langcookie", "en") response = req.load('http://www.4shared.com/web/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/FourSharedCom.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/accounts/FourSharedCom.py') diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index 21aff591b..fe25ccc0e 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -5,14 +5,14 @@ from module.plugins.Account import Account class FourSharedCom(Account): - __name__ = "FourSharedCom" - __type__ = "account" + __name__ = "FourSharedCom" + __type__ = "account" __version__ = "0.03" __description__ = """FourShared.com account plugin""" - __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), - ("stickell", "l.stickell@yahoo.it")] + __license__ = "GPLv3" + __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), + ("stickell", "l.stickell@yahoo.it")] def loadAccountInfo(self, user, req): -- cgit v1.2.3 From c9e31d875d32de31e54959b82bc35eff2b3e0f3f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 10 Nov 2014 00:19:51 +0100 Subject: Code cosmetics --- module/plugins/accounts/FourSharedCom.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'module/plugins/accounts/FourSharedCom.py') diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index fe25ccc0e..565a00cf2 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -21,13 +21,13 @@ class FourSharedCom(Account): def login(self, user, data, req): - req.cj.setCookie("4shared.com", "4langcookie", "en") - response = req.load('http://www.4shared.com/web/login', - post={"login": user, - "password": data['password'], - "remember": "on", - "_remember": "on", - "returnTo": "http://www.4shared.com/account/home.jsp"}) - - if 'Please log in to access your 4shared account' in response: + req.cj.setCookie(".4shared.com", "4langcookie", "en") + res = req.load('http://www.4shared.com/web/login', + post={'login': user, + 'password': data['password'], + 'remember': "on", + '_remember': "on", + 'returnTo': "http://www.4shared.com/account/home.jsp"}) + + if 'Please log in to access your 4shared account' in res: self.wrongPassword() -- cgit v1.2.3 From e8246525f3106c152d6d1436c6a3111e0334520f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 15 Nov 2014 18:04:47 +0100 Subject: Fix cookie domain --- module/plugins/accounts/FourSharedCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/FourSharedCom.py') diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index 565a00cf2..ec19f83f5 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -21,7 +21,7 @@ class FourSharedCom(Account): def login(self, user, data, req): - req.cj.setCookie(".4shared.com", "4langcookie", "en") + req.cj.setCookie("4shared.com", "4langcookie", "en") res = req.load('http://www.4shared.com/web/login', post={'login': user, 'password': data['password'], -- cgit v1.2.3