diff options
Diffstat (limited to 'module/plugins/accounts/BitshareCom.py')
-rw-r--r-- | module/plugins/accounts/BitshareCom.py | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index 00e546f6d..280f008b2 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -1,34 +1,36 @@ # -*- coding: utf-8 -*- -from module.plugins.Account import Account +from module.plugins.internal.Account import Account class BitshareCom(Account): __name__ = "BitshareCom" __type__ = "account" - __version__ = "0.13" + __version__ = "0.15" + __status__ = "testing" __description__ = """Bitshare account plugin""" __license__ = "GPLv3" __authors__ = [("Paul King", None)] - def loadAccountInfo(self, user, req): - html = req.load("http://bitshare.com/mysettings.html") + def parse_info(self, user, password, data, req): + html = self.load("http://bitshare.com/mysettings.html") if "\"http://bitshare.com/myupgrade.html\">Free" in html: - return {"validuntil": -1, "trafficleft": -1, "premium": False} + return {'validuntil': -1, 'trafficleft': -1, 'premium': False} if not '<input type="checkbox" name="directdownload" checked="checked" />' in html: - self.logWarning(_("Activate direct Download in your Bitshare Account")) + self.log_warning(_("Activate direct Download in your Bitshare Account")) - return {"validuntil": -1, "trafficleft": -1, "premium": True} + return {'validuntil': -1, 'trafficleft': -1, 'premium': True} - def login(self, user, data, req): - html = req.load("http://bitshare.com/login.html", - post={"user": user, "password": data['password'], "submit": "Login"}, - decode=True) + def login(self, user, password, data, req): + html = self.load("https://bitshare.com/login.html", + post={'user' : user, + 'password': password, + 'submit' : "Login"}) if "login" in req.lastEffectiveURL: - self.wrongPassword() + self.login_fail() |