diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-18 03:59:11 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-18 03:59:11 +0100 |
commit | 189f3cf05a30726850b3be82c2d7455d85d5e1b5 (patch) | |
tree | 150922cf931605dbd38626a81e98bde29c78515f | |
parent | Merge pull request #1259 from immenz/dev_nitroflare (diff) | |
download | pyload-189f3cf05a30726850b3be82c2d7455d85d5e1b5.tar.xz |
[RealdebridCom] Fix https://github.com/pyload/pyload/issues/1252
-rw-r--r-- | module/plugins/hoster/RealdebridCom.py | 26 |
1 files changed, 2 insertions, 24 deletions
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": "<title>An error occured while processing your request</title>"}): - #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) |