From 43e6a6376625ac73067403ddae3b45a80618d6c8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 3 Oct 2014 19:58:02 +0200 Subject: Rename accounts directory to account --- pyload/plugins/account/BitshareCom.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 pyload/plugins/account/BitshareCom.py (limited to 'pyload/plugins/account/BitshareCom.py') diff --git a/pyload/plugins/account/BitshareCom.py b/pyload/plugins/account/BitshareCom.py new file mode 100644 index 000000000..ad44424b3 --- /dev/null +++ b/pyload/plugins/account/BitshareCom.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account + + +class BitshareCom(Account): + __name__ = "BitshareCom" + __type__ = "account" + __version__ = "0.12" + + __description__ = """Bitshare account plugin""" + __author_name__ = "Paul King" + __author_mail__ = None + + + def loadAccountInfo(self, user, req): + page = req.load("http://bitshare.com/mysettings.html") + + if "\"http://bitshare.com/myupgrade.html\">Free" in page: + return {"validuntil": -1, "trafficleft": -1, "premium": False} + + if not '' in page: + 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) + if "login" in req.lastEffectiveURL: + self.wrongPassword() -- cgit v1.2.3