From 1f7d9ee163bc6416400989431c98db27a7c446a0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 13:40:46 +0100 Subject: [Keep2shareCc] Fix login (still no captcha support) --- module/plugins/accounts/Keep2shareCc.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts/Keep2shareCc.py') diff --git a/module/plugins/accounts/Keep2shareCc.py b/module/plugins/accounts/Keep2shareCc.py index ffae02ae4..fac3cc4a6 100644 --- a/module/plugins/accounts/Keep2shareCc.py +++ b/module/plugins/accounts/Keep2shareCc.py @@ -10,7 +10,7 @@ from module.plugins.Account import Account class Keep2shareCc(Account): __name__ = "Keep2shareCc" __type__ = "account" - __version__ = "0.02" + __version__ = "0.03" __description__ = """Keep2share.cc account plugin""" __license__ = "GPLv3" @@ -18,7 +18,7 @@ class Keep2shareCc(Account): VALID_UNTIL_PATTERN = r'Premium expires: (.+?)' - TRAFFIC_LEFT_PATTERN = r'Available traffic \(today\):(.+?)' + TRAFFIC_LEFT_PATTERN = r'Available traffic \(today\):\s*(.+?)<' LOGIN_FAIL_PATTERN = r'Please fix the following input errors' @@ -63,7 +63,10 @@ class Keep2shareCc(Account): req.cj.setCookie("keep2share.cc", "lang", "en") html = req.load("http://keep2share.cc/login.html", - post={'LoginForm[username]': user, 'LoginForm[password]': data['password']}) + post={'LoginForm[username]' : user, + 'LoginForm[password]' : data['password'], + 'LoginForm[rememberMe]': 1, + 'yt0' : ""}) if re.search(self.LOGIN_FAIL_PATTERN, html): self.wrongPassword() -- cgit v1.2.3