summaryrefslogtreecommitdiffstats
path: root/pyload
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-08-24 18:43:16 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-09-07 20:27:15 +0200
commit8ef97e7fbdbedb9732484ccae02adf4b3df900e8 (patch)
treeb59b88c172b7805abc69f9a1d5ebf8f5597fa545 /pyload
parentLetitbit: Using API to get file information (diff)
downloadpyload-8ef97e7fbdbedb9732484ccae02adf4b3df900e8.tar.xz
Realdebrid: fixed #208
(cherry picked from commit 5c8cfe32756e04526e042ced723ffc7f796dfbd9) Conflicts: pyload/plugins/accounts/RealdebridCom.py
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()