summaryrefslogtreecommitdiff
path: root/searx/results.py
diff options
context:
space:
mode:
authorMohamed Elashri <muhammadelashri@gmail.com>2022-09-30 23:06:54 +0000
committerGitHub <noreply@github.com>2022-09-30 23:06:54 +0000
commit8d5653e60d5299979c0de5e55b1c5ca0bee8190c (patch)
tree8dc02b7663a5c9c91b09483e4499a612d9823698 /searx/results.py
parent212c98c9f55dc602f57b4f01a73192450e9782b7 (diff)
parent62324655ff0d2e6f234b3e31413877b4b4a7a9fa (diff)
downloadsearxng-8d5653e60d5299979c0de5e55b1c5ca0bee8190c.tar.gz
searxng-8d5653e60d5299979c0de5e55b1c5ca0bee8190c.zip
Merge branch 'searxng:master' into master
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