summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/UlozTo.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-07-25 04:59:27 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-07-25 04:59:27 +0200
commit8f17f875f6e28f73ddb10da59c6464bd04922222 (patch)
tree29631cd1f81a40283c71dfdd005b9d24370d5d7f /module/plugins/accounts/UlozTo.py
parentFix typo (diff)
downloadpyload-8f17f875f6e28f73ddb10da59c6464bd04922222.tar.xz
Account rewritten
Diffstat (limited to 'module/plugins/accounts/UlozTo.py')
-rw-r--r--module/plugins/accounts/UlozTo.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/module/plugins/accounts/UlozTo.py b/module/plugins/accounts/UlozTo.py
index 6f3cfe225..ed4c11a23 100644
--- a/module/plugins/accounts/UlozTo.py
+++ b/module/plugins/accounts/UlozTo.py
@@ -21,7 +21,7 @@ class UlozTo(Account):
TRAFFIC_LEFT_PATTERN = r'<li class="menu-kredit"><a .*?title=".+?GB = ([\d.]+) MB"'
- def load_account_info(self, user, req):
+ def parse_info(self, user, password, data, req):
html = self.load("http://www.ulozto.net/")
m = re.search(self.TRAFFIC_LEFT_PATTERN, html)
@@ -32,7 +32,7 @@ class UlozTo(Account):
return {'validuntil': -1, 'trafficleft': trafficleft, 'premium': premium}
- def login(self, user, data, req):
+ def login(self, user, password, data, req):
login_page = self.load('http://www.ulozto.net/?do=web-login')
action = re.findall('<form action="(.+?)"', login_page)[1].replace('&amp;', '&')
token = re.search('_token_" value="(.+?)"', login_page).group(1)
@@ -41,9 +41,9 @@ class UlozTo(Account):
post={'_token_' : token,
'do' : "loginForm-submit",
'login' : u"Přihlásit",
- 'password': data['password'],
+ 'password': password,
'username': user,
'remember': "on"})
if '<div class="flash error">' in html:
- self.wrong_password()
+ self.fail()