From e5ce0acf056dc96c40d5616ab6d2b82f998eefbe Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 3 Aug 2015 00:37:57 +0200 Subject: Use set_cookie instead cj.setCookie --- module/plugins/accounts/FastshareCz.py | 5 +++-- module/plugins/accounts/FilecloudIo.py | 7 ++++--- module/plugins/accounts/FourSharedCom.py | 5 +++-- module/plugins/accounts/Keep2ShareCc.py | 5 +++-- module/plugins/accounts/ShareonlineBiz.py | 5 +++-- module/plugins/accounts/SimplyPremiumCom.py | 5 +++-- module/plugins/accounts/TurbobitNet.py | 5 +++-- module/plugins/accounts/UploadedTo.py | 4 ++-- 8 files changed, 24 insertions(+), 17 deletions(-) (limited to 'module/plugins/accounts') diff --git a/module/plugins/accounts/FastshareCz.py b/module/plugins/accounts/FastshareCz.py index 90b746624..3a3769a1c 100644 --- a/module/plugins/accounts/FastshareCz.py +++ b/module/plugins/accounts/FastshareCz.py @@ -3,12 +3,13 @@ import re from module.plugins.internal.Account import Account +from module.plugins.internal.Plugin import set_cookie class FastshareCz(Account): __name__ = "FastshareCz" __type__ = "account" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __description__ = """Fastshare.cz account plugin""" @@ -39,7 +40,7 @@ class FastshareCz(Account): def login(self, user, password, data, req): - req.cj.setCookie("fastshare.cz", "lang", "en") + set_cookie(req.cj, "fastshare.cz", "lang", "en") self.load('http://www.fastshare.cz/login') #@NOTE: Do not remove or it will not login diff --git a/module/plugins/accounts/FilecloudIo.py b/module/plugins/accounts/FilecloudIo.py index 56d84e2e4..bdb13bd3d 100644 --- a/module/plugins/accounts/FilecloudIo.py +++ b/module/plugins/accounts/FilecloudIo.py @@ -1,13 +1,14 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.Account import Account from module.common.json_layer import json_loads +from module.plugins.internal.Account import Account +from module.plugins.internal.Plugin import set_cookie class FilecloudIo(Account): __name__ = "FilecloudIo" __type__ = "account" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __description__ = """FilecloudIo account plugin""" @@ -43,7 +44,7 @@ class FilecloudIo(Account): def login(self, user, password, data, req): - req.cj.setCookie("secure.filecloud.io", "lang", "en") + set_cookie(req.cj, "secure.filecloud.io", "lang", "en") html = self.load('https://secure.filecloud.io/user-login.html') if not hasattr(self, "form_data"): diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index ef2140359..a7ec8e2c5 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -1,12 +1,13 @@ # -*- coding: utf-8 -*- from module.plugins.internal.Account import Account +from module.plugins.internal.Plugin import set_cookie class FourSharedCom(Account): __name__ = "FourSharedCom" __type__ = "account" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __description__ = """FourShared.com account plugin""" @@ -21,7 +22,7 @@ class FourSharedCom(Account): def login(self, user, password, data, req): - req.cj.setCookie("4shared.com", "4langcookie", "en") + set_cookie(req.cj, "4shared.com", "4langcookie", "en") res = self.load("https://www.4shared.com/web/login", post={'login' : user, diff --git a/module/plugins/accounts/Keep2ShareCc.py b/module/plugins/accounts/Keep2ShareCc.py index a7f8564d9..014d43a69 100644 --- a/module/plugins/accounts/Keep2ShareCc.py +++ b/module/plugins/accounts/Keep2ShareCc.py @@ -4,12 +4,13 @@ import re import time from module.plugins.internal.Account import Account +from module.plugins.internal.Plugin import set_cookie class Keep2ShareCc(Account): __name__ = "Keep2ShareCc" __type__ = "account" - __version__ = "0.07" + __version__ = "0.08" __status__ = "testing" __description__ = """Keep2Share.cc account plugin""" @@ -61,7 +62,7 @@ class Keep2ShareCc(Account): def login(self, user, password, data, req): - req.cj.setCookie("keep2share.cc", "lang", "en") + set_cookie(req.cj, "keep2share.cc", "lang", "en") html = self.load("https://keep2share.cc/login.html", post={'LoginForm[username]' : user, diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py index 28b2b0c68..87bbc4632 100644 --- a/module/plugins/accounts/ShareonlineBiz.py +++ b/module/plugins/accounts/ShareonlineBiz.py @@ -3,12 +3,13 @@ import re from module.plugins.internal.Account import Account +from module.plugins.internal.Plugin import set_cookie class ShareonlineBiz(Account): __name__ = "ShareonlineBiz" __type__ = "account" - __version__ = "0.38" + __version__ = "0.39" __status__ = "testing" __description__ = """Share-online.biz account plugin""" @@ -65,4 +66,4 @@ class ShareonlineBiz(Account): def login(self, user, password, data, req): api = self.api_response(user, password, req) - req.cj.setCookie("share-online.biz", 'a', api['a']) + set_cookie(req.cj, "share-online.biz", 'a', api['a']) diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py index f8b5ff50b..a5c69f51c 100644 --- a/module/plugins/accounts/SimplyPremiumCom.py +++ b/module/plugins/accounts/SimplyPremiumCom.py @@ -2,12 +2,13 @@ from module.common.json_layer import json_loads from module.plugins.internal.Account import Account +from module.plugins.internal.Plugin import set_cookie class SimplyPremiumCom(Account): __name__ = "SimplyPremiumCom" __type__ = "account" - __version__ = "0.07" + __version__ = "0.08" __status__ = "testing" __description__ = """Simply-Premium.com account plugin""" @@ -39,7 +40,7 @@ class SimplyPremiumCom(Account): def login(self, user, password, data, req): - req.cj.setCookie("simply-premium.com", "lang", "EN") + set_cookie(req.cj, "simply-premium.com", "lang", "EN") html = self.load("https://www.simply-premium.com/login.php", post={'key': user} if not password else {'login_name': user, 'login_pass': password}) diff --git a/module/plugins/accounts/TurbobitNet.py b/module/plugins/accounts/TurbobitNet.py index 9dd3e4d3c..206e7874f 100644 --- a/module/plugins/accounts/TurbobitNet.py +++ b/module/plugins/accounts/TurbobitNet.py @@ -4,12 +4,13 @@ import re import time from module.plugins.internal.Account import Account +from module.plugins.internal.Plugin import set_cookie class TurbobitNet(Account): __name__ = "TurbobitNet" __type__ = "account" - __version__ = "0.04" + __version__ = "0.05" __status__ = "testing" __description__ = """TurbobitNet account plugin""" @@ -32,7 +33,7 @@ class TurbobitNet(Account): def login(self, user, password, data, req): - req.cj.setCookie("turbobit.net", "user_lang", "en") + set_cookie(req.cj, "turbobit.net", "user_lang", "en") html = self.load("http://turbobit.net/user/login", post={"user[login]" : user, diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py index 1757f2af8..09e891c19 100644 --- a/module/plugins/accounts/UploadedTo.py +++ b/module/plugins/accounts/UploadedTo.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class UploadedTo(Account): __name__ = "UploadedTo" __type__ = "account" - __version__ = "0.33" + __version__ = "0.34" __status__ = "testing" __description__ = """Uploaded.to account plugin""" @@ -62,7 +62,7 @@ class UploadedTo(Account): def login(self, user, password, data, req): - #: req.cj.setCookie("uploaded.net", "lang", "en") + self.load("http://uploaded.net/language/en") html = self.load("http://uploaded.net/io/login", post={'id': user, -- cgit v1.2.3