mirror of
https://github.com/searxng/searxng.git
synced 2025-08-17 09:16:44 +02:00
using Query class for parsing of search query
This commit is contained in:
parent
510aba5e66
commit
62d1a70c84
2 changed files with 13 additions and 56 deletions
|
@ -39,6 +39,7 @@ class Query(object):
|
|||
self.engines = []
|
||||
self.languages = []
|
||||
|
||||
# parse query, if tags are set, which change the serch engine or search-language
|
||||
def parse_query(self):
|
||||
self.query_parts = []
|
||||
|
||||
|
@ -55,7 +56,8 @@ class Query(object):
|
|||
parse_next = False
|
||||
|
||||
# part does only contain spaces, skip
|
||||
if query_part.isspace():
|
||||
if query_part.isspace()\
|
||||
or query_part == '':
|
||||
parse_next = True
|
||||
self.query_parts.append(query_part)
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue