Преглед изворни кода

little update update comments in search.py

Thomas Pointhuber пре 10 година
родитељ
комит
22da73b8bb
1 измењених фајлова са 5 додато и 5 уклоњено
  1. 5
    5
      searx/search.py

+ 5
- 5
searx/search.py Прегледај датотеку

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