diff options
author | Adam Tauber <asciimoo@gmail.com> | 2020-10-26 13:33:40 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2020-10-26 14:15:59 +0100 |
commit | 2aef38c3b9d1fe93e9d665a49b10151d63d92392 (patch) | |
tree | 3e56ec69f2e2f56ff09d4831b4634c4e7ef19ca2 /searx/query.py | |
parent | 0a44fa8bb7eca0d81f0ebdab37b9845b260473ad (diff) | |
download | searxng-2aef38c3b9d1fe93e9d665a49b10151d63d92392.tar.gz searxng-2aef38c3b9d1fe93e9d665a49b10151d63d92392.zip |
[fix] resolve query_parts regression
Diffstat (limited to 'searx/query.py')
-rw-r--r-- | searx/query.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/searx/query.py b/searx/query.py index d82493141..7effda15a 100644 --- a/searx/query.py +++ b/searx/query.py @@ -59,8 +59,6 @@ class RawTextQuery: # part does only contain spaces, skip if query_part.isspace()\ or query_part == '': - searx_query_part = True - self.query_parts.append(query_part) continue # this force the timeout @@ -147,8 +145,9 @@ class RawTextQuery: self.specific = True # append query part to query_part list - self.query_parts.append(query_part) - if not searx_query_part: + if searx_query_part: + self.query_parts.append(query_part) + else: self.user_query_parts.append(query_part) def changeQuery(self, query): @@ -160,4 +159,4 @@ class RawTextQuery: def getFullQuery(self): # get full querry including whitespaces - return ''.join(self.query_parts) + return '{0} {1}'.format(''.join(self.query_parts), self.getQuery()).strip() |