From 8e7d14bae4d3c836f029a1235eb227380acc3f75 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 16 Feb 2015 21:59:10 +0100 Subject: Fix plugins to work on 0.4.10 --- pyload/plugin/account/BitshareCom.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 pyload/plugin/account/BitshareCom.py (limited to 'pyload/plugin/account/BitshareCom.py') diff --git a/pyload/plugin/account/BitshareCom.py b/pyload/plugin/account/BitshareCom.py new file mode 100644 index 000000000..4774b9062 --- /dev/null +++ b/pyload/plugin/account/BitshareCom.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- + +from pyload.plugin.Account import Account + + +class BitshareCom(Account): + __name__ = "BitshareCom" + __type__ = "account" + __version__ = "0.13" + + __description__ = """Bitshare account plugin""" + __license__ = "GPLv3" + __authors__ = [("Paul King", "")] + + + def loadAccountInfo(self, user, req): + html = req.load("http://bitshare.com/mysettings.html") + + if "\"http://bitshare.com/myupgrade.html\">Free" in html: + return {"validuntil": -1, "trafficleft": -1, "premium": False} + + if not '' in html: + self.logWarning(_("Activate direct Download in your Bitshare Account")) + + 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"}, + cookies=True, + decode=True) + + if "login" in req.lastEffectiveURL: + self.wrongPassword() -- cgit v1.2.3