From cbf7c2a394f5d829f52b11ea3cbaad64aa7f2595 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 13:57:40 +0100 Subject: [UlozTo] Improve account login --- module/plugins/accounts/UlozTo.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/module/plugins/accounts/UlozTo.py b/module/plugins/accounts/UlozTo.py index 3c9b24f3a..7236a4fa8 100644 --- a/module/plugins/accounts/UlozTo.py +++ b/module/plugins/accounts/UlozTo.py @@ -10,7 +10,7 @@ from module.plugins.Account import Account class UlozTo(Account): __name__ = "UlozTo" __type__ = "account" - __version__ = "0.09" + __version__ = "0.10" __description__ = """Uloz.to account plugin""" __license__ = "GPLv3" @@ -22,12 +22,8 @@ class UlozTo(Account): def loadAccountInfo(self, user, req): - self.phpsessid = req.cj.getCookie("ULOSESSID") #@NOTE: this cookie gets lost somehow after each request - html = req.load("http://www.ulozto.net/", decode=True) - req.cj.setCookie("ulozto.net", "ULOSESSID", self.phpsessid) - m = re.search(self.TRAFFIC_LEFT_PATTERN, html) trafficleft = float(m.group(1).replace(' ', '').replace(',', '.')) * 1000 * 1.048 if m else 0 @@ -46,7 +42,8 @@ class UlozTo(Account): 'do' : "loginForm-submit", 'login' : u"Přihlásit", 'password': data['password'], - 'username': user}, + 'username': user, + 'remember': "on"}, decode=True) if '
' in html: -- cgit v1.2.3