From 834a315649a0090812118f34618e48aff160c162 Mon Sep 17 00:00:00 2001 From: Ivo Buff Date: Fri, 12 Jul 2013 00:45:36 +0200 Subject: SimplydebridCOM plugin added SimplydebridCOM plugin added --- module/plugins/hoster/SimplydebridCOM.py | 50 ++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 module/plugins/hoster/SimplydebridCOM.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SimplydebridCOM.py b/module/plugins/hoster/SimplydebridCOM.py new file mode 100644 index 000000000..262b0b607 --- /dev/null +++ b/module/plugins/hoster/SimplydebridCOM.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from module.plugins.Hoster import Hoster +from module.utils import html_unescape +from urllib import quote, unquote +from time import sleep +import re + +class SimplydebridCOM(Hoster): + __name__ = "SimplydebridCOM" + __version__ = "0.1" + __type__ = "hoster" + __pattern__ = r"http://\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 + + def process(self, pyfile): + #print pyfile.url + if not self.account: + self.logError(_("Please enter your simply-debrid.com account or deactivate this plugin")) + self.fail("No simply-debrid.com account provided") + + self.logDebug("simply-debrid.com: Old URL: %s" % pyfile.url) + + #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") + + if re.match(self.__pattern__, new_url): + new_url = new_url + else: + page = self.req.load('http://simply-debrid.com/api.php?dl='+new_url)#+'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password']) + if(re.search(r'tiger\sLink',page,re.I) or re.search(r'Invalid\sLink',page,re.I) or (re.search(r'api',page,re.I) and re.search(r'error',page,re.I))): + self.fail('Unable to unrestrict link') + #print page + new_url = page + + #print new_url + self.setWait(5) + self.wait() + self.logDebug("Unrestricted URL: " + new_url) + + self.download(new_url, disposition=True) \ No newline at end of file -- cgit v1.2.3 From 88f6fcac584da7e822d9ac4084553972c521f044 Mon Sep 17 00:00:00 2001 From: Ivo Buff Date: Fri, 12 Jul 2013 11:28:40 +0200 Subject: Cleanup Some cleanup and changed tabs to 4 spaces --- module/plugins/hoster/SimplydebridCOM.py | 75 +++++++++++++++----------------- 1 file changed, 36 insertions(+), 39 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SimplydebridCOM.py b/module/plugins/hoster/SimplydebridCOM.py index 262b0b607..c4bce15b1 100644 --- a/module/plugins/hoster/SimplydebridCOM.py +++ b/module/plugins/hoster/SimplydebridCOM.py @@ -8,43 +8,40 @@ from time import sleep import re class SimplydebridCOM(Hoster): - __name__ = "SimplydebridCOM" - __version__ = "0.1" - __type__ = "hoster" - __pattern__ = r"http://\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 - - def process(self, pyfile): - #print pyfile.url - if not self.account: - self.logError(_("Please enter your simply-debrid.com account or deactivate this plugin")) - self.fail("No simply-debrid.com account provided") - - self.logDebug("simply-debrid.com: Old URL: %s" % pyfile.url) - - #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") - - if re.match(self.__pattern__, new_url): - new_url = new_url - else: - page = self.req.load('http://simply-debrid.com/api.php?dl='+new_url)#+'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password']) - if(re.search(r'tiger\sLink',page,re.I) or re.search(r'Invalid\sLink',page,re.I) or (re.search(r'api',page,re.I) and re.search(r'error',page,re.I))): - self.fail('Unable to unrestrict link') - #print page - new_url = page - - #print new_url - self.setWait(5) - self.wait() - self.logDebug("Unrestricted URL: " + new_url) + __name__ = "SimplydebridCOM" + __version__ = "0.1" + __type__ = "hoster" + __pattern__ = r"http://\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") - self.download(new_url, disposition=True) \ No newline at end of file + def setup(self): + self.resumeDownload = self.multiDL = True + self.chunkLimit = 1 + + def process(self, pyfile): + if not self.account: + self.logError(_("Please enter your simply-debrid.com account or deactivate this plugin")) + self.fail("No simply-debrid.com account provided") + + self.logDebug("simply-debrid.com: Old URL: %s" % pyfile.url) + + #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") + + if re.match(self.__pattern__, new_url): + new_url = new_url + else: + page = self.req.load('http://simply-debrid.com/api.php?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 + + self.setWait(5) + self.wait() + self.logDebug("Unrestricted URL: " + new_url) + + self.download(new_url, disposition=True) \ No newline at end of file -- cgit v1.2.3 From abac8315248b6a72b0b4906548d9372f459cdd2e Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 20 Jul 2013 18:14:08 +0200 Subject: Code optimized --- module/plugins/hoster/SimplydebridCOM.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SimplydebridCOM.py b/module/plugins/hoster/SimplydebridCOM.py index c4bce15b1..499c17145 100644 --- a/module/plugins/hoster/SimplydebridCOM.py +++ b/module/plugins/hoster/SimplydebridCOM.py @@ -24,24 +24,22 @@ class SimplydebridCOM(Hoster): if not self.account: self.logError(_("Please enter your simply-debrid.com account or deactivate this plugin")) self.fail("No simply-debrid.com account provided") - - self.logDebug("simply-debrid.com: Old URL: %s" % pyfile.url) - + + self.logDebug("Old URL: %s" % pyfile.url) + #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") - - if re.match(self.__pattern__, new_url): - new_url = new_url - else: - page = self.req.load('http://simply-debrid.com/api.php?dl='+new_url)#+'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password']) + + 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') new_url = page - + self.setWait(5) self.wait() self.logDebug("Unrestricted URL: " + new_url) - - self.download(new_url, disposition=True) \ No newline at end of file + + self.download(new_url, disposition=True) -- cgit v1.2.3 From 3964f4231fa5ff68b07a50d23d3b233a0735612d Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 20 Jul 2013 20:35:18 +0200 Subject: Simplydebrid: fixed syntax error + code reformatted + removed unused imports --- module/plugins/hoster/SimplydebridCOM.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SimplydebridCOM.py b/module/plugins/hoster/SimplydebridCOM.py index 499c17145..69c5b8af1 100644 --- a/module/plugins/hoster/SimplydebridCOM.py +++ b/module/plugins/hoster/SimplydebridCOM.py @@ -1,12 +1,12 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from module.plugins.Hoster import Hoster -from module.utils import html_unescape from urllib import quote, unquote -from time import sleep import re +from module.plugins.Hoster import Hoster + + class SimplydebridCOM(Hoster): __name__ = "SimplydebridCOM" __version__ = "0.1" @@ -34,7 +34,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)): + 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 4d6f805c40f48cda9c57bc2e4a8f09bc37e046ec Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 20 Jul 2013 20:43:35 +0200 Subject: Simplydebrid: renamed to standard --- module/plugins/hoster/SimplydebridCOM.py | 45 -------------------------------- module/plugins/hoster/SimplydebridCom.py | 45 ++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 45 deletions(-) delete mode 100644 module/plugins/hoster/SimplydebridCOM.py create mode 100644 module/plugins/hoster/SimplydebridCom.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SimplydebridCOM.py b/module/plugins/hoster/SimplydebridCOM.py deleted file mode 100644 index 69c5b8af1..000000000 --- a/module/plugins/hoster/SimplydebridCOM.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from urllib import quote, unquote -import re - -from module.plugins.Hoster import Hoster - - -class SimplydebridCOM(Hoster): - __name__ = "SimplydebridCOM" - __version__ = "0.1" - __type__ = "hoster" - __pattern__ = r"http://\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 - - def process(self, pyfile): - if not self.account: - self.logError(_("Please enter your simply-debrid.com account or deactivate this plugin")) - self.fail("No simply-debrid.com account provided") - - self.logDebug("Old URL: %s" % pyfile.url) - - #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") - - 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') - new_url = page - - self.setWait(5) - self.wait() - self.logDebug("Unrestricted URL: " + new_url) - - self.download(new_url, disposition=True) diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py new file mode 100644 index 000000000..2dcbd0f21 --- /dev/null +++ b/module/plugins/hoster/SimplydebridCom.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from urllib import quote, unquote +import re + +from module.plugins.Hoster import Hoster + + +class SimplydebridCom(Hoster): + __name__ = "SimplydebridCom" + __version__ = "0.1" + __type__ = "hoster" + __pattern__ = r"http://\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 + + def process(self, pyfile): + if not self.account: + self.logError(_("Please enter your simply-debrid.com account or deactivate this plugin")) + self.fail("No simply-debrid.com account provided") + + self.logDebug("Old URL: %s" % pyfile.url) + + #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") + + 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') + new_url = page + + self.setWait(5) + self.wait() + self.logDebug("Unrestricted URL: " + new_url) + + self.download(new_url, disposition=True) -- cgit v1.2.3 From b57439b737a749bf40f62662b6c4434331cc79b0 Mon Sep 17 00:00:00 2001 From: Ivo Buff Date: Sun, 21 Jul 2013 12:35:39 +0200 Subject: More link transformation Added all link transformations I got from the support --- module/plugins/hoster/SimplydebridCom.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 2dcbd0f21..f13b16ae0 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -31,6 +31,15 @@ class SimplydebridCom(Hoster): 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 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']) -- cgit v1.2.3 From d61d1d0b0901acc90770cc48613425013efc0a3d Mon Sep 17 00:00:00 2001 From: Ivo Buff Date: Wed, 7 Aug 2013 22:02:26 +0200 Subject: simplydebrid "handle" bad links simplydebrid "handle" bad links --- module/plugins/hoster/SimplydebridCom.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index f13b16ae0..d13c161e8 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -52,3 +52,8 @@ class SimplydebridCom(Hoster): self.logDebug("Unrestricted URL: " + new_url) self.download(new_url, disposition=True) + + check = self.checkDownload({"bad1": "No address associated with hostname", "bad2": " Date: Mon, 12 Aug 2013 13:34:18 +0200 Subject: simplydebrid: "further improvements" added debuglog output of the link we send to simplydebrid changed retrying time of a bad file (we try it every 2.5 min for an hour) --- module/plugins/hoster/SimplydebridCom.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index d13c161e8..35cc3fb02 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -41,6 +41,8 @@ class SimplydebridCom(Hoster): 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 'tiger Link' in page or 'Invalid Link' in page or ('API' in page and 'ERROR' in page): @@ -56,4 +58,4 @@ class SimplydebridCom(Hoster): check = self.checkDownload({"bad1": "No address associated with hostname", "bad2": " Date: Mon, 12 Aug 2013 13:39:44 +0200 Subject: Simplydebrid: added new line added new line at the end of the hoster file --- module/plugins/hoster/SimplydebridCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 35cc3fb02..03396cc27 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -58,4 +58,4 @@ class SimplydebridCom(Hoster): check = self.checkDownload({"bad1": "No address associated with hostname", "bad2": " Date: Tue, 13 Aug 2013 14:33:18 +0200 Subject: Simplydebrid: cosmetics --- module/plugins/hoster/SimplydebridCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 03396cc27..67cc39255 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -22,7 +22,7 @@ class SimplydebridCom(Hoster): def process(self, pyfile): if not self.account: - self.logError(_("Please enter your simply-debrid.com account or deactivate this plugin")) + self.logError(_("Please enter your %s account or deactivate this plugin") % "simply-debrid.com") self.fail("No simply-debrid.com account provided") self.logDebug("Old URL: %s" % pyfile.url) @@ -37,12 +37,12 @@ class SimplydebridCom(Hoster): 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 'tiger Link' in page or 'Invalid Link' in page or ('API' in page and 'ERROR' in page): -- cgit v1.2.3