From 03c7e8f0665c1036ece49155340697aa3b2d107d Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 13 Aug 2019 13:48:03 +0100 Subject: return matching string from buffer.find() as most uses were redundantly regexing --- modules/shorturl.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/shorturl.py') diff --git a/modules/shorturl.py b/modules/shorturl.py index 668ac0a4..77a9a352 100644 --- a/modules/shorturl.py +++ b/modules/shorturl.py @@ -72,8 +72,7 @@ class Module(ModuleManager.BaseModule): else: url = target.buffer.find(utils.http.REGEX_URL) if url: - url = re.search(utils.http.REGEX_URL, url.message).group(0) - url = utils.http.url_sanitise(url) + url = utils.http.url_sanitise(url.match) if not url: raise utils.EventError("No URL provided/found.") return url -- cgit v1.3.1-10-gc9f91