summaryrefslogtreecommitdiff
path: root/searx/results.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/results.py')
-rw-r--r--searx/results.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/searx/results.py b/searx/results.py
index 471d16981..a941fdfba 100644
--- a/searx/results.py
+++ b/searx/results.py
@@ -354,10 +354,13 @@ class ResultContainer:
for result in self._merged_results:
score = result_score(result)
result['score'] = score
+
+ # removing html content and whitespace duplications
if result.get('content'):
result['content'] = utils.html_to_text(result['content']).strip()
- # removing html content and whitespace duplications
- result['title'] = ' '.join(utils.html_to_text(result['title']).strip().split())
+ if result.get('title'):
+ result['title'] = ' '.join(utils.html_to_text(result['title']).strip().split())
+
for result_engine in result['engines']:
counter_add(score, 'engine', result_engine, 'score')