summaryrefslogtreecommitdiff
path: root/searx/query.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2015-01-12 14:14:40 +0100
committerAdam Tauber <asciimoo@gmail.com>2015-01-12 14:14:40 +0100
commitb47b8cc2c6cd3c746807a2fe955e956d43556081 (patch)
treea855b15018b62d130aef4958b61e916d84b9e708 /searx/query.py
parentd7ea44ab8dd7f728ce19589b48618d7eb1669170 (diff)
parent96c4d52eef7de13f6fa1d6e0ae651c50c3bba515 (diff)
downloadsearxng-b47b8cc2c6cd3c746807a2fe955e956d43556081.tar.gz
searxng-b47b8cc2c6cd3c746807a2fe955e956d43556081.zip
Merge pull request #166 from Cqoicebordel/non-exclusif-bang
Add non exclusif bang
Diffstat (limited to 'searx/query.py')
-rw-r--r--searx/query.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/searx/query.py b/searx/query.py
index cd2b3f423..e491284f0 100644
--- a/searx/query.py
+++ b/searx/query.py
@@ -38,6 +38,7 @@ class Query(object):
self.query_parts = []
self.engines = []
self.languages = []
+ self.specific = False
# parse query, if tags are set, which
# change the serch engine or search-language
@@ -83,7 +84,7 @@ class Query(object):
break
# this force a engine or category
- if query_part[0] == '!':
+ if query_part[0] == '!' or query_part[0] == '?':
prefix = query_part[1:].replace('_', ' ')
# check if prefix is equal with engine shortcut
@@ -110,6 +111,9 @@ class Query(object):
for engine in categories[prefix]
if engine not in self.blocked_engines)
+ if query_part[0] == '!':
+ self.specific = True
+
# append query part to query_part list
self.query_parts.append(query_part)