From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/hoster/SimplydebridCom.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 2aab12e04..78f6c0a34 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -7,13 +7,16 @@ from module.plugins.Hoster import Hoster class SimplydebridCom(Hoster): __name__ = "SimplydebridCom" - __version__ = "0.1" __type__ = "hoster" + __version__ = "0.1" + __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd.php/*' + __description__ = """Simply-debrid.com hoster plugin""" __author_name__ = "Kagenoshin" __author_mail__ = "kagenoshin@gmx.ch" + def setup(self): self.resumeDownload = self.multiDL = True self.chunkLimit = 1 -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/hoster/SimplydebridCom.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 78f6c0a34..818eea392 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -13,8 +13,7 @@ class SimplydebridCom(Hoster): __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd.php/*' __description__ = """Simply-debrid.com hoster plugin""" - __author_name__ = "Kagenoshin" - __author_mail__ = "kagenoshin@gmx.ch" + __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] def setup(self): -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- 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 818eea392..7476cf45e 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -13,6 +13,7 @@ class SimplydebridCom(Hoster): __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd.php/*' __description__ = """Simply-debrid.com hoster plugin""" + __license__ = "GPLv3" __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] -- cgit v1.2.3 From c5d1a4fd8943877c6d2eb3843e0de725dba5191e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:09:53 +0200 Subject: Pattern update 2 --- 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 7476cf45e..c7df990e3 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -10,7 +10,7 @@ class SimplydebridCom(Hoster): __type__ = "hoster" __version__ = "0.1" - __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd.php/*' + __pattern__ = r'http://(?:www\.)?\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 0eb6e7ec4a1144dcca824d8add049787d3da1762 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 19:44:59 +0200 Subject: Two space before function declaration --- 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 c7df990e3..dea82591d 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -21,6 +21,7 @@ class SimplydebridCom(Hoster): self.resumeDownload = self.multiDL = True self.chunkLimit = 1 + def process(self, pyfile): if not self.account: self.logError(_("Please enter your %s account or deactivate this plugin") % "simply-debrid.com") -- cgit v1.2.3 From e3f5280529921100f48bb8a79853bf480c7611e4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Oct 2014 02:53:05 +0200 Subject: Replace single quotes with doubles in self.error and self.fail msg --- 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 dea82591d..66b1ff222 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -48,7 +48,7 @@ class SimplydebridCom(Hoster): if not re.match(self.__pattern__, new_url): page = self.load('http://simply-debrid.com/api.php', get={'dl': new_url}) # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password']) 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.fail("Unable to unrestrict link") new_url = page self.setWait(5) -- cgit v1.2.3 From 9f2ebe486a3e155fb6a60e07cccb77ab6a772eb2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 26 Oct 2014 02:31:54 +0200 Subject: Extend translation support in plugins + a lot of code cosmetics and typo fixes --- 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 66b1ff222..91072d7d2 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -25,7 +25,7 @@ class SimplydebridCom(Hoster): def process(self, pyfile): if not self.account: self.logError(_("Please enter your %s account or deactivate this plugin") % "simply-debrid.com") - self.fail("No simply-debrid.com account provided") + self.fail(_("No simply-debrid.com account provided")) self.logDebug("Old URL: %s" % pyfile.url) @@ -48,7 +48,7 @@ class SimplydebridCom(Hoster): if not re.match(self.__pattern__, new_url): page = self.load('http://simply-debrid.com/api.php', get={'dl': new_url}) # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password']) 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.fail(_("Unable to unrestrict link")) new_url = page self.setWait(5) -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/hoster/SimplydebridCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 91072d7d2..ac7d7ef9a 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -6,15 +6,15 @@ from module.plugins.Hoster import Hoster class SimplydebridCom(Hoster): - __name__ = "SimplydebridCom" - __type__ = "hoster" + __name__ = "SimplydebridCom" + __type__ = "hoster" __version__ = "0.1" __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php/*' __description__ = """Simply-debrid.com hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] + __license__ = "GPLv3" + __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] def setup(self): -- cgit v1.2.3 From 67587fbe0335cacfde28a86ba729b9d567ce1da7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 7 Dec 2014 00:27:18 +0100 Subject: Plugin code cosmetics (3) --- module/plugins/hoster/SimplydebridCom.py | 7 ++++--- 1 file changed, 4 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 ac7d7ef9a..3d4d3be93 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -18,8 +18,9 @@ class SimplydebridCom(Hoster): def setup(self): - self.resumeDownload = self.multiDL = True - self.chunkLimit = 1 + self.resumeDownload = True + self.multiDL = True + self.chunkLimit = 1 def process(self, pyfile): @@ -46,7 +47,7 @@ class SimplydebridCom(Hoster): self.logDebug("New URL: %s" % new_url) if not re.match(self.__pattern__, new_url): - page = self.load('http://simply-debrid.com/api.php', get={'dl': new_url}) # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password']) + page = self.load("http://simply-debrid.com/api.php", get={'dl': new_url}) # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password']) if 'tiger Link' in page or 'Invalid Link' in page or ('API' in page and 'ERROR' in page): self.fail(_("Unable to unrestrict link")) new_url = page -- cgit v1.2.3 From 6151e81fa0b325dffda3da4228d5821e73db3ef3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 9 Dec 2014 01:19:46 +0100 Subject: Fix __version__ format in some plugins --- 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 3d4d3be93..0fe4ae0f8 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -8,7 +8,7 @@ from module.plugins.Hoster import Hoster class SimplydebridCom(Hoster): __name__ = "SimplydebridCom" __type__ = "hoster" - __version__ = "0.1" + __version__ = "0.10" __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php/*' -- cgit v1.2.3 From 57300575fa97107d172e0c9909b244c8c8ae6c12 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Dec 2014 20:02:20 +0100 Subject: Extend SimpleHoster in multi-hoster plugins --- module/plugins/hoster/SimplydebridCom.py | 53 +++++++++++++++----------------- 1 file changed, 25 insertions(+), 28 deletions(-) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 0fe4ae0f8..6f3ecfc42 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -2,10 +2,10 @@ import re -from module.plugins.Hoster import Hoster +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -class SimplydebridCom(Hoster): +class SimplydebridCom(SimpleHoster): __name__ = "SimplydebridCom" __type__ = "hoster" __version__ = "0.10" @@ -23,42 +23,39 @@ class SimplydebridCom(Hoster): self.chunkLimit = 1 - def process(self, pyfile): - if not self.account: - self.logError(_("Please enter your %s account or deactivate this plugin") % "simply-debrid.com") - self.fail(_("No simply-debrid.com account provided")) + def handleMulti(self): + #fix the links for simply-debrid.com! + self.link = self.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") - self.logDebug("Old URL: %s" % pyfile.url) + if('fileparadox' in self.link): + self.link = self.link.replace("http://", "https://") - #fix the links for simply-debrid.com! - new_url = pyfile.url - new_url = new_url.replace("clz.to", "cloudzer.net/file") - new_url = new_url.replace("http://share-online", "http://www.share-online") - new_url = new_url.replace("ul.to", "uploaded.net/file") - new_url = new_url.replace("uploaded.com", "uploaded.net") - new_url = new_url.replace("filerio.com", "filerio.in") - new_url = new_url.replace("lumfile.com", "lumfile.se") - if('fileparadox' in new_url): - new_url = new_url.replace("http://", "https://") - - if re.match(self.__pattern__, new_url): - new_url = new_url - - self.logDebug("New URL: %s" % new_url) - - if not re.match(self.__pattern__, new_url): - page = self.load("http://simply-debrid.com/api.php", get={'dl': new_url}) # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password']) + if re.match(self.__pattern__, self.link): + self.link = self.link + + 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']) if 'tiger Link' in page or 'Invalid Link' in page or ('API' in page and 'ERROR' in page): self.fail(_("Unable to unrestrict link")) - new_url = page + self.link = page self.setWait(5) self.wait() - self.logDebug("Unrestricted URL: " + new_url) - self.download(new_url, disposition=True) + def checkFile(self): check = self.checkDownload({"bad1": "No address associated with hostname", "bad2": " Date: Wed, 17 Dec 2014 21:47:39 +0100 Subject: Extend SimpleHoster in multi-hoster plugins (2) --- 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 6f3ecfc42..196cdfd4b 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class SimplydebridCom(SimpleHoster): __name__ = "SimplydebridCom" __type__ = "hoster" - __version__ = "0.10" + __version__ = "0.11" __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php/*' -- cgit v1.2.3 From 0860e09f5ff16ee3f097f6f9d444f277a38abd72 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Dec 2014 23:03:46 +0100 Subject: Extend SimpleHoster in multi-hoster plugins (3) --- module/plugins/hoster/SimplydebridCom.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 196cdfd4b..1b8ff11b2 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -17,6 +17,9 @@ class SimplydebridCom(SimpleHoster): __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] + MULTI_HOSTER = True + + def setup(self): self.resumeDownload = True self.multiDL = True -- cgit v1.2.3 From 4e9c8f7ab1269966a9eac9e1b6363f5458f9f970 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 18 Dec 2014 16:07:21 +0100 Subject: Update checkFile routine in some hoster plugins --- module/plugins/hoster/SimplydebridCom.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 1b8ff11b2..8fa756606 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class SimplydebridCom(SimpleHoster): __name__ = "SimplydebridCom" __type__ = "hoster" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php/*' @@ -55,6 +55,8 @@ class SimplydebridCom(SimpleHoster): def checkFile(self): + super(SimplydebridCom, self).checkFile() + check = self.checkDownload({"bad1": "No address associated with hostname", "bad2": " Date: Tue, 23 Dec 2014 13:20:53 +0100 Subject: New plugin: MultiHoster --- module/plugins/hoster/SimplydebridCom.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/SimplydebridCom.py') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 8fa756606..e17ee41de 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -class SimplydebridCom(SimpleHoster): +class SimplydebridCom(MultiHoster): __name__ = "SimplydebridCom" __type__ = "hoster" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php/*' @@ -17,9 +17,6 @@ class SimplydebridCom(SimpleHoster): __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - MULTI_HOSTER = True - - def setup(self): self.resumeDownload = True self.multiDL = True -- cgit v1.2.3 From a4786e340993bbfc5d2bf971c9bec18863d3dd80 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 23 Dec 2014 19:29:15 +0100 Subject: [MultiHoster] Update --- 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 e17ee41de..b4be77031 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 class SimplydebridCom(MultiHoster): __name__ = "SimplydebridCom" __type__ = "hoster" - __version__ = "0.13" + __version__ = "0.14" __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php/*' @@ -23,7 +23,7 @@ class SimplydebridCom(MultiHoster): self.chunkLimit = 1 - def handleMulti(self): + def handlePremium(self): #fix the links for simply-debrid.com! self.link = self.pyfile.url self.link = self.link.replace("clz.to", "cloudzer.net/file") -- cgit v1.2.3 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