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/MultiDebridCom.py | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'module/plugins/hoster/MultiDebridCom.py') diff --git a/module/plugins/hoster/MultiDebridCom.py b/module/plugins/hoster/MultiDebridCom.py index 71f3df908..f70fa0f0e 100644 --- a/module/plugins/hoster/MultiDebridCom.py +++ b/module/plugins/hoster/MultiDebridCom.py @@ -1,34 +1,23 @@ # -*- coding: utf-8 -*- -############################################################################ -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU Affero General Public License as # -# published by the Free Software Foundation, either version 3 of the # -# License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU Affero General Public License for more details. # -# # -# You should have received a copy of the GNU Affero General Public License # -# along with this program. If not, see . # -############################################################################ import re -from module.plugins.Hoster import Hoster from module.common.json_layer import json_loads +from module.plugins.Hoster import Hoster class MultiDebridCom(Hoster): __name__ = "MultiDebridCom" - __version__ = "0.03" __type__ = "hoster" + __version__ = "0.03" + __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' + __description__ = """Multi-debrid.com hoster plugin""" __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" + def setup(self): self.chunkLimit = -1 self.resumeDownload = True -- cgit v1.2.3 From 22334b664ff2be7bbbe0627e4d65cf222bd29919 Mon Sep 17 00:00:00 2001 From: stickell Date: Thu, 11 Sep 2014 12:16:03 +0200 Subject: [MultiDebrid] renamed to Myfastline --- module/plugins/hoster/MultiDebridCom.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'module/plugins/hoster/MultiDebridCom.py') diff --git a/module/plugins/hoster/MultiDebridCom.py b/module/plugins/hoster/MultiDebridCom.py index f70fa0f0e..bae864806 100644 --- a/module/plugins/hoster/MultiDebridCom.py +++ b/module/plugins/hoster/MultiDebridCom.py @@ -9,15 +9,12 @@ from module.plugins.Hoster import Hoster class MultiDebridCom(Hoster): __name__ = "MultiDebridCom" __type__ = "hoster" - __version__ = "0.03" - + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' - - __description__ = """Multi-debrid.com hoster plugin""" + __description__ = """Myfastfile.com hoster plugin""" __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" - def setup(self): self.chunkLimit = -1 self.resumeDownload = True @@ -26,11 +23,11 @@ class MultiDebridCom(Hoster): if re.match(self.__pattern__, pyfile.url): new_url = pyfile.url elif not self.account: - self.logError(_("Please enter your %s account or deactivate this plugin") % "Multi-debrid.com") - self.fail("No Multi-debrid.com account provided") + self.logError(_("Please enter your %s account or deactivate this plugin") % "Myfastfile.com") + self.fail("No Myfastfile.com account provided") else: self.logDebug("Original URL: %s" % pyfile.url) - page = self.req.load('http://multi-debrid.com/api.php', + page = self.req.load('http://myfastfile.com/api.php', get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'], 'link': pyfile.url}) self.logDebug("JSON data: " + page) -- cgit v1.2.3 From 6f87a713970d6a18c0a3e622286488ec9e3b5494 Mon Sep 17 00:00:00 2001 From: stickell Date: Thu, 11 Sep 2014 15:52:16 +0200 Subject: [MultiDebrid] renaming files to MyfastlineCom --- module/plugins/hoster/MultiDebridCom.py | 42 --------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 module/plugins/hoster/MultiDebridCom.py (limited to 'module/plugins/hoster/MultiDebridCom.py') diff --git a/module/plugins/hoster/MultiDebridCom.py b/module/plugins/hoster/MultiDebridCom.py deleted file mode 100644 index bae864806..000000000 --- a/module/plugins/hoster/MultiDebridCom.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from module.common.json_layer import json_loads -from module.plugins.Hoster import Hoster - - -class MultiDebridCom(Hoster): - __name__ = "MultiDebridCom" - __type__ = "hoster" - __version__ = "0.04" - __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' - __description__ = """Myfastfile.com hoster plugin""" - __author_name__ = "stickell" - __author_mail__ = "l.stickell@yahoo.it" - - def setup(self): - self.chunkLimit = -1 - self.resumeDownload = True - - def process(self, pyfile): - if re.match(self.__pattern__, pyfile.url): - new_url = pyfile.url - elif not self.account: - self.logError(_("Please enter your %s account or deactivate this plugin") % "Myfastfile.com") - self.fail("No Myfastfile.com account provided") - else: - self.logDebug("Original URL: %s" % pyfile.url) - page = self.req.load('http://myfastfile.com/api.php', - get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'], - 'link': pyfile.url}) - self.logDebug("JSON data: " + page) - page = json_loads(page) - if page['status'] != 'ok': - self.fail('Unable to unrestrict link') - new_url = page['link'] - - if new_url != pyfile.url: - self.logDebug("Unrestricted URL: " + new_url) - - self.download(new_url, disposition=True) -- cgit v1.2.3