summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-27 13:57:40 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-27 13:57:40 +0100
commitcbf7c2a394f5d829f52b11ea3cbaad64aa7f2595 (patch)
tree32a36ea7e82ebd4d446c4a3347cca5293ffbe982
parentMore plugin __pattern__ improved (crypter ones this time) (diff)
downloadpyload-cbf7c2a394f5d829f52b11ea3cbaad64aa7f2595.tar.xz
[UlozTo] Improve account login
-rw-r--r--module/plugins/accounts/UlozTo.py9
1 files 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 '<div class="flash error">' in html: