Pārlūkot izejas kodu

ensure all parameters are merged in results

marc 7 gadus atpakaļ
vecāks
revīzija
5f36e85b37
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5
    0
      searx/results.py

+ 5
- 0
searx/results.py Parādīt failu

@@ -218,6 +218,11 @@ class ResultContainer(object):
218 218
                     result_content_len(duplicated.get('content', '')):
219 219
                 duplicated['content'] = result['content']
220 220
 
221
+            # merge all result's parameters not found in duplicate
222
+            for key in result.keys():
223
+                if not duplicated.get(key):
224
+                    duplicated[key] = result.get(key)
225
+
221 226
             # add the new position
222 227
             duplicated['positions'].append(position)
223 228