From 189f3cf05a30726850b3be82c2d7455d85d5e1b5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 18 Mar 2015 03:59:11 +0100 Subject: [RealdebridCom] Fix https://github.com/pyload/pyload/issues/1252 --- module/plugins/hoster/RealdebridCom.py | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index 888f74cb7..d76c8bac1 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -14,7 +14,7 @@ from module.utils import parseFileSize class RealdebridCom(MultiHoster): __name__ = "RealdebridCom" __type__ = "hoster" - __version__ = "0.65" + __version__ = "0.66" __pattern__ = r'https?://((?:www\.|s\d+\.)?real-debrid\.com/dl/|[\w^_]\.rdb\.so/d/)[\w^_]+' @@ -23,22 +23,12 @@ class RealdebridCom(MultiHoster): __authors__ = [("Devirex Hazzard", "naibaf_11@yahoo.de")] - def getFilename(self, url): - try: - name = unquote(url.rsplit("/", 1)[1]) - except IndexError: - name = "Unknown_Filename..." - if not name or name.endswith(".."): #: incomplete filename, append random stuff - name += "%s.tmp" % randrange(100, 999) - return name - - def setup(self): self.chunkLimit = 3 def handlePremium(self, pyfile): - data = json_loads(self.load("https://real-debrid.com/ajax/unrestrict.php", + data = json_loads(self.load("http://real-debrid.com/ajax/unrestrict.php", get={'lang' : "en", 'link' : pyfile.url, 'password': self.getPassword(), @@ -63,17 +53,5 @@ class RealdebridCom(MultiHoster): else: self.link = self.link.replace("https://", "http://") - if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown") or pyfile.name.endswith('..'): - #only use when name wasnt already set - pyfile.name = self.getFilename(self.link) - - - def checkFile(self, rules={}): - if self.checkDownload({"error": "An error occured while processing your request"}): - #usual this download can safely be retried - self.retry(wait_time=60, reason=_("An error occured while generating link")) - - return super(RealdebridCom, self).checkFile(rules) - getInfo = create_getInfo(RealdebridCom) -- cgit v1.2.3