From baf6b15e17e6f13b554a055abbc7752ee7d14852 Mon Sep 17 00:00:00 2001 From: magmaus3 Date: Sun, 30 Oct 2022 16:38:25 +0100 Subject: [PATCH] Improve parameter parsing --- iwm_browser/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/iwm_browser/main.py b/iwm_browser/main.py index e5a0c47..1d893b6 100644 --- a/iwm_browser/main.py +++ b/iwm_browser/main.py @@ -66,9 +66,8 @@ async def search( min_diff = 0.00 max_diff = 5.00 - params = re.findall("[a-z\-\_]*:[a-zA-Z0-9_\-]*", q) - search = re.sub("[a-z\-\_]*:[a-zA-Z0-9_\-]*", "", q) - + params = re.findall("[a-z\-\_]*:[a-zA-Z0-9._\-]*", q) + search = re.sub("\S[a-z\-\_]*:[a-zA-Z0-9._\-]*", "", q).lstrip().rstrip() for i in params: split = i.split(':') if split[0] == "author":