diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-15 18:18:30 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-15 18:18:30 +0200 |
commit | ee9bb026433c4cd79b84efb06ca195447c4d7916 (patch) | |
tree | 3c250388191a16b88250dfa0f7e6fd24849a6542 /module/plugins/accounts/RealdebridCom.py | |
parent | [MultiHook] Update (diff) | |
download | pyload-ee9bb026433c4cd79b84efb06ca195447c4d7916.tar.xz |
Fix https://github.com/pyload/pyload/issues/1501
Diffstat (limited to 'module/plugins/accounts/RealdebridCom.py')
-rw-r--r-- | module/plugins/accounts/RealdebridCom.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/module/plugins/accounts/RealdebridCom.py b/module/plugins/accounts/RealdebridCom.py index a4bd52062..9b13aeefd 100644 --- a/module/plugins/accounts/RealdebridCom.py +++ b/module/plugins/accounts/RealdebridCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.Account import Account class RealdebridCom(Account): __name__ = "RealdebridCom" __type__ = "account" - __version__ = "0.46" + __version__ = "0.47" __description__ = """Real-Debrid.com account plugin""" __license__ = "GPLv3" @@ -17,17 +17,21 @@ class RealdebridCom(Account): def loadAccountInfo(self, user, req): if self.pin_code: - return {"premium": False} + return + html = req.load("https://real-debrid.com/api/account.php") - xml = xml.dom.minidom.parseString(html) - account_info = {"validuntil": float(xml.getElementsByTagName("expiration")[0].childNodes[0].nodeValue), - "trafficleft": -1} + xml = xml.dom.minidom.parseString(html) + + validuntil = float(xml.getElementsByTagName("expiration")[0].childNodes[0].nodeValue) - return account_info + return {'validuntil' : validuntil, + 'trafficleft': -1 , + 'premium' : True } def login(self, user, data, req): self.pin_code = False + html = req.load("https://real-debrid.com/ajax/login.php", get={"user": user, "pass": data['password']}, decode=True) |