From cdb06469a640c1875229903a2dbdfa8be469b5bc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 13:52:30 +0100 Subject: Improve a lot of plugin __pattern__ --- module/plugins/hoster/SimplydebridCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index b4be77031..5e6b47efc 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -10,7 +10,7 @@ class SimplydebridCom(MultiHoster): __type__ = "hoster" __version__ = "0.14" - __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php/*' + __pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php' __description__ = """Simply-debrid.com hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From ea58af3c625d90aec6becfd943289e42e4a71a9a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 2 Jan 2015 02:49:26 +0100 Subject: Code cosmetics --- module/plugins/hoster/SimplydebridCom.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 5e6b47efc..8211d40d4 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -17,12 +17,6 @@ class SimplydebridCom(MultiHoster): __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - def setup(self): - self.resumeDownload = True - self.multiDL = True - self.chunkLimit = 1 - - def handlePremium(self): #fix the links for simply-debrid.com! self.link = self.pyfile.url -- cgit v1.2.3 From 7979d0833573a107baae8c45330b8b5874630a76 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 4 Jan 2015 20:26:13 +0100 Subject: Spare code improvements --- module/plugins/hoster/SimplydebridCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 8211d40d4..0be9bfa12 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -36,7 +36,7 @@ class SimplydebridCom(MultiHoster): self.logDebug("New URL: %s" % self.link) if not re.match(self.__pattern__, self.link): - page = self.load("http://simply-debrid.com/api.php", get={'dl': self.link}) # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password']) + page = self.load("http://simply-debrid.com/api.php", get={'dl': self.link}) if 'tiger Link' in page or 'Invalid Link' in page or ('API' in page and 'ERROR' in page): self.fail(_("Unable to unrestrict link")) self.link = page -- cgit v1.2.3 From fd105f8e51768ec1943cda2375bdfdbe5b0a3951 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 9 Jan 2015 00:35:51 +0100 Subject: "New Year" Update: hoster plugins --- module/plugins/hoster/SimplydebridCom.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 0be9bfa12..a26bc5751 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -8,18 +8,18 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class SimplydebridCom(MultiHoster): __name__ = "SimplydebridCom" __type__ = "hoster" - __version__ = "0.14" + __version__ = "0.15" __pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php' - __description__ = """Simply-debrid.com hoster plugin""" + __description__ = """Simply-debrid.com multi-hoster plugin""" __license__ = "GPLv3" __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - def handlePremium(self): + def handlePremium(self, pyfile): #fix the links for simply-debrid.com! - self.link = self.pyfile.url + self.link = pyfile.url self.link = self.link.replace("clz.to", "cloudzer.net/file") self.link = self.link.replace("http://share-online", "http://www.share-online") self.link = self.link.replace("ul.to", "uploaded.net/file") @@ -46,12 +46,10 @@ class SimplydebridCom(MultiHoster): def checkFile(self): - super(SimplydebridCom, self).checkFile() - - check = self.checkDownload({"bad1": "No address associated with hostname", "bad2": " Date: Sun, 8 Feb 2015 02:09:45 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/SimplydebridCom.py | 37 +++++++++++++------------------- 1 file changed, 15 insertions(+), 22 deletions(-) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index a26bc5751..24811d6aa 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -2,7 +2,7 @@ import re -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo +from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo, replace_patterns class SimplydebridCom(MultiHoster): @@ -19,35 +19,28 @@ class SimplydebridCom(MultiHoster): def handlePremium(self, pyfile): #fix the links for simply-debrid.com! - self.link = pyfile.url - self.link = self.link.replace("clz.to", "cloudzer.net/file") - self.link = self.link.replace("http://share-online", "http://www.share-online") - self.link = self.link.replace("ul.to", "uploaded.net/file") - self.link = self.link.replace("uploaded.com", "uploaded.net") - self.link = self.link.replace("filerio.com", "filerio.in") - self.link = self.link.replace("lumfile.com", "lumfile.se") - - if('fileparadox' in self.link): + self.link = replace_patterns(pyfile.url, [("clz.to", "cloudzer.net/file") + ("http://share-online", "http://www.share-online") + ("ul.to", "uploaded.net/file") + ("uploaded.com", "uploaded.net") + ("filerio.com", "filerio.in") + ("lumfile.com", "lumfile.se")] + + if 'fileparadox' in self.link: self.link = self.link.replace("http://", "https://") - if re.match(self.__pattern__, self.link): - self.link = self.link + self.html = self.load("http://simply-debrid.com/api.php", get={'dl': self.link}) + if 'tiger Link' in self.html or 'Invalid Link' in self.html or ('API' in self.html and 'ERROR' in self.html): + self.error(_("Unable to unrestrict link")) - self.logDebug("New URL: %s" % self.link) + self.link = self.html - if not re.match(self.__pattern__, self.link): - page = self.load("http://simply-debrid.com/api.php", get={'dl': self.link}) - if 'tiger Link' in page or 'Invalid Link' in page or ('API' in page and 'ERROR' in page): - self.fail(_("Unable to unrestrict link")) - self.link = page - - self.setWait(5) - self.wait() + self.wait(5) def checkFile(self): if self.checkDownload({"error": "No address associated with hostname"}): - self.retry(24, 3 * 60, "Bad file downloaded") + self.retry(24, 3 * 60, _("Bad file downloaded")) return super(SimplydebridCom, self).checkFile() -- cgit v1.2.3 From 1f8ae39acba53cebb46331692515f2ed42f8e12d Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 10 Mar 2015 22:42:32 +0100 Subject: Update plugins after SimpleHoster changes --- module/plugins/hoster/SimplydebridCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 24811d6aa..7079b7fbb 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo, rep class SimplydebridCom(MultiHoster): __name__ = "SimplydebridCom" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php' @@ -38,11 +38,11 @@ class SimplydebridCom(MultiHoster): self.wait(5) - def checkFile(self): + def checkFile(self, rules={}): if self.checkDownload({"error": "No address associated with hostname"}): self.retry(24, 3 * 60, _("Bad file downloaded")) - return super(SimplydebridCom, self).checkFile() + return super(SimplydebridCom, self).checkFile(rules) getInfo = create_getInfo(SimplydebridCom) -- cgit v1.2.3 From eadd14d7691eddb1eb5c58350b3518ef60865e7a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 21 Mar 2015 17:22:35 +0100 Subject: [SimplydebridCom] Typo --- module/plugins/hoster/SimplydebridCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 7079b7fbb..8af1c204d 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo, rep class SimplydebridCom(MultiHoster): __name__ = "SimplydebridCom" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php' @@ -24,7 +24,7 @@ class SimplydebridCom(MultiHoster): ("ul.to", "uploaded.net/file") ("uploaded.com", "uploaded.net") ("filerio.com", "filerio.in") - ("lumfile.com", "lumfile.se")] + ("lumfile.com", "lumfile.se")]) if 'fileparadox' in self.link: self.link = self.link.replace("http://", "https://") -- cgit v1.2.3 From 7d90803262ccbb4fc5296a4dc3ce30fe98f55631 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 25 Mar 2015 23:10:07 +0100 Subject: __config__ cosmetics --- module/plugins/hoster/SimplydebridCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 8af1c204d..aae71d983 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -11,6 +11,7 @@ class SimplydebridCom(MultiHoster): __version__ = "0.17" __pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php' + __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Simply-debrid.com multi-hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3