summaryrefslogtreecommitdiff
path: root/searx/query.py
diff options
context:
space:
mode:
authorThomas Pointhuber <thomas.pointhuber@gmx.at>2014-10-01 17:57:53 +0200
committerThomas Pointhuber <thomas.pointhuber@gmx.at>2014-10-01 17:57:53 +0200
commit62d1a70c84367403222c15e25f597a8d6b336151 (patch)
tree577d49dea475995029662cca91781eb4dabcaf1e /searx/query.py
parent510aba5e6699f76e5b9dc32db18b0f19db6e5da4 (diff)
using Query class for parsing of search query
Diffstat (limited to 'searx/query.py')
-rw-r--r--searx/query.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/searx/query.py b/searx/query.py
index 59a1e347b..612d46f4b 100644
--- a/searx/query.py
+++ b/searx/query.py
@@ -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