diff options
Diffstat (limited to 'module/plugins/accounts/BitshareCom.py')
-rw-r--r-- | module/plugins/accounts/BitshareCom.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index aabab9e19..4774b9062 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -6,7 +6,7 @@ from pyload.plugin.Account import Account class BitshareCom(Account): __name__ = "BitshareCom" __type__ = "account" - __version__ = "0.12" + __version__ = "0.13" __description__ = """Bitshare account plugin""" __license__ = "GPLv3" @@ -14,19 +14,22 @@ class BitshareCom(Account): def loadAccountInfo(self, user, req): - page = req.load("http://bitshare.com/mysettings.html") + html = req.load("http://bitshare.com/mysettings.html") - if "\"http://bitshare.com/myupgrade.html\">Free" in page: + if "\"http://bitshare.com/myupgrade.html\">Free" in html: return {"validuntil": -1, "trafficleft": -1, "premium": False} - if not '<input type="checkbox" name="directdownload" checked="checked" />' in page: + if not '<input type="checkbox" name="directdownload" checked="checked" />' in html: self.logWarning(_("Activate direct Download in your Bitshare Account")) return {"validuntil": -1, "trafficleft": -1, "premium": True} def login(self, user, data, req): - page = req.load("http://bitshare.com/login.html", - post={"user": user, "password": data['password'], "submit": "Login"}, cookies=True) + html = req.load("http://bitshare.com/login.html", + post={"user": user, "password": data['password'], "submit": "Login"}, + cookies=True, + decode=True) + if "login" in req.lastEffectiveURL: self.wrongPassword() |