summaryrefslogtreecommitdiffstats
path: root/pyload
diff options
context:
space:
mode:
Diffstat (limited to 'pyload')
-rw-r--r--pyload/plugins/accounts/RealdebridCom.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/pyload/plugins/accounts/RealdebridCom.py b/pyload/plugins/accounts/RealdebridCom.py
index e47c68d6c..2ef8dbb79 100644
--- a/pyload/plugins/accounts/RealdebridCom.py
+++ b/pyload/plugins/accounts/RealdebridCom.py
@@ -12,6 +12,8 @@ class RealdebridCom(MultiHoster):
__author_mail__ = ("naibaf_11@yahoo.de")
def loadAccountInfo(self, req):
+ if self.pin_code:
+ return {"premium": False}
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),
@@ -20,12 +22,13 @@ class RealdebridCom(MultiHoster):
return account_info
def login(self, user, data, req):
+ self.pin_code = False
page = req.load("https://real-debrid.com/ajax/login.php", get={"user": user, "pass": 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()
+ elif "PIN Code required" in page:
+ self.logWarning('PIN code required. Please login to https://real-debrid.com using the PIN or disable the double authentication in your control panel on https://real-debrid.com.')
+ self.pin_code = True
def loadHosterList(self, req):
page = req.load("http://real-debrid.com/api/hosters.php").replace("\"", "").strip()