From ba8959ad7c18ce4165d29b7a472d845bd96f4735 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 27 Sep 2022 17:01:00 +0200 Subject: [fix] typos / reported by @kianmeng in searx PR-3366 [PR-3366] https://github.com/searx/searx/pull/3366 Signed-off-by: Markus Heiser --- searx/results.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'searx/results.py') diff --git a/searx/results.py b/searx/results.py index ab242b838..5dd1bff21 100644 --- a/searx/results.py +++ b/searx/results.py @@ -134,9 +134,9 @@ def result_score(result): if hasattr(engines[result_engine], 'weight'): weight *= float(engines[result_engine].weight) - occurences = len(result['positions']) + occurrences = len(result['positions']) - return sum((occurences * weight) / position for position in result['positions']) + return sum((occurrences * weight) / position for position in result['positions']) class Timing(NamedTuple): @@ -286,7 +286,7 @@ class ResultContainer: if 'template' not in result: result['template'] = 'default.html' - # strip multiple spaces and cariage returns from content + # strip multiple spaces and carriage returns from content if result.get('content'): result['content'] = WHITESPACE_REGEX.sub(' ', result['content']) @@ -315,7 +315,7 @@ class ResultContainer: return merged_result else: # it's an image - # it's a duplicate if the parsed_url, template and img_src are differents + # it's a duplicate if the parsed_url, template and img_src are different if result.get('img_src', '') == merged_result.get('img_src', ''): return merged_result return None -- cgit v1.2.3