summaryrefslogtreecommitdiff
path: root/searx/results.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2022-09-27 17:01:00 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2022-09-27 18:32:14 +0200
commitba8959ad7c18ce4165d29b7a472d845bd96f4735 (patch)
tree70da2e25a94588348fd5e66890a4a9fceb9e1ff2 /searx/results.py
parent94c4cc126b16d4cd1653c410df63af4bc0a4e998 (diff)
downloadsearxng-ba8959ad7c18ce4165d29b7a472d845bd96f4735.tar.gz
searxng-ba8959ad7c18ce4165d29b7a472d845bd96f4735.zip
[fix] typos / reported by @kianmeng in searx PR-3366
[PR-3366] https://github.com/searx/searx/pull/3366 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/results.py')
-rw-r--r--searx/results.py8
1 files changed, 4 insertions, 4 deletions
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