Explorar el Código

[enh] merging only results with same rendering templates

asciimoo hace 11 años
padre
commit
5e358ea9a9
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2
    1
      searx/engines/__init__.py

+ 2
- 1
searx/engines/__init__.py Ver fichero

106
         for new_res in results:
106
         for new_res in results:
107
             if res['parsed_url'].netloc == new_res['parsed_url'].netloc and\
107
             if res['parsed_url'].netloc == new_res['parsed_url'].netloc and\
108
                res['parsed_url'].path == new_res['parsed_url'].path and\
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
                 duplicated = new_res
111
                 duplicated = new_res
111
                 break
112
                 break
112
         if duplicated:
113
         if duplicated: