From dda110fd633b3c6f3e9752f4999bee3de824c156 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 30 May 2015 03:37:11 +0200 Subject: [XFileSharingPro] Improve hook regexp --- module/plugins/hooks/XFileSharingPro.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hooks/XFileSharingPro.py') diff --git a/module/plugins/hooks/XFileSharingPro.py b/module/plugins/hooks/XFileSharingPro.py index 7443266b3..92d89dc01 100644 --- a/module/plugins/hooks/XFileSharingPro.py +++ b/module/plugins/hooks/XFileSharingPro.py @@ -8,7 +8,7 @@ from module.plugins.Hook import Hook class XFileSharingPro(Hook): __name__ = "XFileSharingPro" __type__ = "hook" - __version__ = "0.37" + __version__ = "0.38" __config__ = [("activated" , "bool", "Activated" , True ), ("use_hoster_list" , "bool", "Load listed hosters only" , False), @@ -17,15 +17,15 @@ class XFileSharingPro(Hook): ("hoster_list" , "str" , "Hoster list (comma separated)" , "" ), ("crypter_list" , "str" , "Crypter list (comma separated)", "" )] - __description__ = """Load XFileSharingPro based hosters and crypter which don't need a own plugin to run""" + __description__ = """Load XFileSharingPro based hosters and crypters which don't need a own plugin to run""" __license__ = "GPLv3" __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] interval = 0 #@TODO: Remove in 0.4.10 - regexp = {'hoster' : (r'https?://(?:www\.)?(?P[\w\-.^_]{3,63}(?:\.[a-zA-Z]{2,})(?:\:\d+)?)/(?:embed-)?\w{12}(?:\W|$)', + regexp = {'hoster' : (r'https?://(?:www\.)?(?:\w+\.)*?(?P(?:[\d.]+|[\w\-^_]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:embed-)?\w{12}(?:\W|$)', r'https?://(?:[^/]+\.)?(?P%s)/(?:embed-)?\w+'), - 'crypter': (r'https?://(?:www\.)?(?P[\w\-.^_]{3,63}(?:\.[a-zA-Z]{2,})(?:\:\d+)?)/(?:user|folder)s?/\w+', + 'crypter': (r'https?://(?:www\.)?(?:\w+\.)*?(?P(?:[\d.]+|[\w\-^_]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:user|folder)s?/\w+', r'https?://(?:[^/]+\.)?(?P%s)/(?:user|folder)s?/\w+')} HOSTER_BUILTIN = [#WORKING HOSTERS: -- cgit v1.2.3