From 90cec08e25aa9c32e053842d954b5aa5b7d5c389 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Fri, 18 Oct 2013 08:24:58 +0200 Subject: [PATCH] [fix] dict keys --- searx/engines/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py index cc531bbbe..cdf667e3c 100644 --- a/searx/engines/__init__.py +++ b/searx/engines/__init__.py @@ -94,7 +94,7 @@ def search(query, request, selected_engines): duplicated = new_res break if duplicated: - if len(res['content']) > len(duplicated): + if len(res.get('content', '')) > len(duplicated.get('content', '')): duplicated['content'] = res['content'] duplicated['score'] += score else: