summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-05-24 19:48:33 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-05-24 19:48:33 +0200
commitada420db11c99d1b0758bc8ef9b14b25ff0e16e1 (patch)
tree63d2bc1cfac22d4f3000c73be21abcaa39d2ff26 /module/plugins/accounts
parentstore cli config per user (diff)
downloadpyload-ada420db11c99d1b0758bc8ef9b14b25ff0e16e1.tar.xz
RealdebridCom plugin
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/RealdebridCom.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/module/plugins/accounts/RealdebridCom.py b/module/plugins/accounts/RealdebridCom.py
new file mode 100644
index 000000000..3137987a9
--- /dev/null
+++ b/module/plugins/accounts/RealdebridCom.py
@@ -0,0 +1,25 @@
+from module.plugins.Account import Account
+import xml.dom.minidom as dom
+
+class RealdebridCom(Account):
+ __name__ = "RealdebridCom"
+ __version__ = "0.4"
+ __type__ = "account"
+ __description__ = """Real-Debrid.com account plugin"""
+ __author_name__ = ("Devirex, Hazzard")
+ __author_mail__ = ("naibaf_11@yahoo.de")
+
+ def loadAccountInfo(self, user, req):
+ page = req.load("http://real-debrid.com/api/account.php")
+ xml = dom.parseString(page)
+ account_info = {"validuntil": int(xml.getElementsByTagName("expiration")[0].childNodes[0].nodeValue),
+ "trafficleft": -1}
+
+ return account_info
+
+ def login(self, user, data, req):
+ page = req.load("https://real-debrid.com/ajax/login.php?user=%s&pass=%s" % (user, data["password"]))
+ #page = req.load("https://real-debrid.com/login.html", post={"user": user, "pass": data["password"]}, cookies=True)
+
+ if "Your login informations are incorrect" in page:
+ self.wrongPassword()