diff options
Diffstat (limited to 'module/plugins/accounts/UploadableCh.py')
-rw-r--r-- | module/plugins/accounts/UploadableCh.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/module/plugins/accounts/UploadableCh.py b/module/plugins/accounts/UploadableCh.py index 86ae5dd17..9c2649e51 100644 --- a/module/plugins/accounts/UploadableCh.py +++ b/module/plugins/accounts/UploadableCh.py @@ -1,20 +1,21 @@ # -*- coding: utf-8 -*- -from module.plugins.Account import Account +from module.plugins.internal.Account import Account class UploadableCh(Account): __name__ = "UploadableCh" __type__ = "account" - __version__ = "0.03" + __version__ = "0.05" + __status__ = "testing" __description__ = """Uploadable.ch account plugin""" __license__ = "GPLv3" __authors__ = [("Sasch", "gsasch@gmail.com")] - def loadAccountInfo(self, user, req): - html = req.load("http://www.uploadable.ch/login.php") + def parse_info(self, user, password, data, req): + html = self.load("http://www.uploadable.ch/login.php") premium = '<a href="/logout.php"' in html trafficleft = -1 if premium else None @@ -22,13 +23,12 @@ class UploadableCh(Account): return {'validuntil': None, 'trafficleft': trafficleft, 'premium': premium} #@TODO: validuntil - def login(self, user, data, req): - html = req.load("http://www.uploadable.ch/login.php", - post={'userName' : user, - 'userPassword' : data["password"], - 'autoLogin' : "1", - 'action__login': "normalLogin"}, - decode=True) + def login(self, user, password, data, req): + html = self.load("http://www.uploadable.ch/login.php", + post={'userName' : user, + 'userPassword' : password, + 'autoLogin' : "1", + 'action__login': "normalLogin"}) if "Login failed" in html: - self.wrongPassword() + self.login_fail() |