|
@@ -251,7 +251,7 @@ class Search(object):
|
251
|
251
|
if query_parts[0].startswith(':'):
|
252
|
252
|
lang = query_parts[0][1:].lower()
|
253
|
253
|
|
254
|
|
- # check if any language-code equal with declared language-codes
|
|
254
|
+ # check if any language-code is equal with declared language-codes
|
255
|
255
|
for lc in language_codes:
|
256
|
256
|
lang_id, lang_name, country = map(str.lower, lc)
|
257
|
257
|
|
|
@@ -268,21 +268,21 @@ class Search(object):
|
268
|
268
|
elif query_parts[0].startswith('!'):
|
269
|
269
|
prefix = query_parts[0][1:].replace('_', ' ')
|
270
|
270
|
|
271
|
|
- # check if prefix equal with engine shortcut
|
|
271
|
+ # check if prefix is equal with engine shortcut
|
272
|
272
|
if prefix in engine_shortcuts\
|
273
|
273
|
and not engine_shortcuts[prefix] in self.blocked_engines:
|
274
|
274
|
modified = True
|
275
|
275
|
self.engines.append({'category': 'none',
|
276
|
276
|
'name': engine_shortcuts[prefix]})
|
277
|
277
|
|
278
|
|
- # check if prefix equal with engine name
|
|
278
|
+ # check if prefix is equal with engine name
|
279
|
279
|
elif prefix in engines\
|
280
|
280
|
and not prefix in self.blocked_engines:
|
281
|
281
|
modified = True
|
282
|
282
|
self.engines.append({'category': 'none',
|
283
|
283
|
'name': prefix})
|
284
|
284
|
|
285
|
|
- # check if prefix equal with categorie name
|
|
285
|
+ # check if prefix is equal with categorie name
|
286
|
286
|
elif prefix in categories:
|
287
|
287
|
modified = True
|
288
|
288
|
# using all engines for that search, which are declared under that categorie name
|
|
@@ -305,7 +305,7 @@ class Search(object):
|
305
|
305
|
results = {}
|
306
|
306
|
suggestions = set()
|
307
|
307
|
|
308
|
|
- # increase number of active searches
|
|
308
|
+ # increase number of searches
|
309
|
309
|
number_of_searches += 1
|
310
|
310
|
|
311
|
311
|
# set default useragent
|