diff options
Diffstat (limited to 'module/plugins/hoster/MegaDebridEu.py')
-rw-r--r-- | module/plugins/hoster/MegaDebridEu.py | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/module/plugins/hoster/MegaDebridEu.py b/module/plugins/hoster/MegaDebridEu.py index 1e68cec22..13415d063 100644 --- a/module/plugins/hoster/MegaDebridEu.py +++ b/module/plugins/hoster/MegaDebridEu.py @@ -1,38 +1,27 @@ # -*- 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 <http://www.gnu.org/licenses/>. # -############################################################################ import re + from urllib import unquote_plus -from module.plugins.Hoster import Hoster from module.common.json_layer import json_loads +from module.plugins.Hoster import Hoster class MegaDebridEu(Hoster): __name__ = "MegaDebridEu" - __version__ = "0.4" __type__ = "hoster" + __version__ = "0.4" + __pattern__ = r'^https?://(?:w{3}\d+\.mega-debrid.eu|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/download/file/[^/]+/.+$' + __description__ = """mega-debrid.eu hoster plugin""" __author_name__ = "D.Ducatel" __author_mail__ = "dducatel@je-geek.fr" - # Define the base URL of MegaDebrid api API_URL = "https://www.mega-debrid.eu/api.php" + def getFilename(self, url): try: return unquote_plus(url.rsplit("/", 1)[1]) |