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 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 module/plugins/hoster/SimplydebridCom.py (limited to 'module/plugins/hoster/SimplydebridCom.py') 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/SimplydebridCom.py') 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/SimplydebridCom.py') 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/SimplydebridCom.py') 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/SimplydebridCom.py') 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/SimplydebridCom.py') 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