Procházet zdrojové kódy

[enh] merging only results with same rendering templates

asciimoo před 11 roky
rodič
revize
5e358ea9a9
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2
    1
      searx/engines/__init__.py

+ 2
- 1
searx/engines/__init__.py Zobrazit soubor

@@ -106,7 +106,8 @@ def search(query, request, selected_categories):
106 106
         for new_res in results:
107 107
             if res['parsed_url'].netloc == new_res['parsed_url'].netloc and\
108 108
                res['parsed_url'].path == new_res['parsed_url'].path and\
109
-               res['parsed_url'].query == new_res['parsed_url'].query:
109
+               res['parsed_url'].query == new_res['parsed_url'].query and\
110
+               res.get('template') == new_res.get('template'):
110 111
                 duplicated = new_res
111 112
                 break
112 113
         if duplicated: