aboutsummaryrefslogtreecommitdiff
path: root/modules/title.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-08-13 13:48:03 +0100
committerGravatar jesopo2019-08-13 13:48:03 +0100
commit03c7e8f0665c1036ece49155340697aa3b2d107d (patch)
tree55cb3283e4c27389b2b0a75107feef5be66243c9 /modules/title.py
parent"!yt" without args should get .message from BufferLine (diff)
signature
return matching string from buffer.find() as most uses were redundantly regexing
Diffstat (limited to 'modules/title.py')
-rw-r--r--modules/title.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/title.py b/modules/title.py
index 703ea476..9308dddc 100644
--- a/modules/title.py
+++ b/modules/title.py
@@ -84,9 +84,9 @@ class Module(ModuleManager.BaseModule):
if len(event["args"]) > 0:
url = event["args_split"][0]
else:
- url = event["target"].buffer.find(utils.http.REGEX_URL)
- if url:
- url = re.search(utils.http.REGEX_URL, url.message).group(0)
+ match = event["target"].buffer.find(utils.http.REGEX_URL)
+ if match:
+ url = match.match
if not url:
raise utils.EventError("No URL provided/found.")