mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
Sync upstream
This commit is contained in:
commit
3457464f07
3 changed files with 4 additions and 5 deletions
|
@ -4,7 +4,7 @@ cov-core==1.15.0
|
||||||
black==24.3.0
|
black==24.3.0
|
||||||
pylint==3.2.6
|
pylint==3.2.6
|
||||||
splinter==0.21.0
|
splinter==0.21.0
|
||||||
selenium==4.23.1
|
selenium==4.24.0
|
||||||
Pallets-Sphinx-Themes==2.1.3
|
Pallets-Sphinx-Themes==2.1.3
|
||||||
Sphinx<=7.1.2; python_version == '3.8'
|
Sphinx<=7.1.2; python_version == '3.8'
|
||||||
Sphinx==7.4.7; python_version > '3.8'
|
Sphinx==7.4.7; python_version > '3.8'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
certifi==2024.7.4
|
certifi==2024.8.30
|
||||||
babel==2.16.0
|
babel==2.16.0
|
||||||
flask-babel==4.0.0
|
flask-babel==4.0.0
|
||||||
flask==3.0.3
|
flask==3.0.3
|
||||||
|
|
|
@ -9,7 +9,6 @@ from typing import List, NamedTuple, Set
|
||||||
from urllib.parse import urlparse, unquote
|
from urllib.parse import urlparse, unquote
|
||||||
|
|
||||||
from searx import logger
|
from searx import logger
|
||||||
from searx import utils
|
|
||||||
from searx.engines import engines
|
from searx.engines import engines
|
||||||
from searx.metrics import histogram_observe, counter_add, count_error
|
from searx.metrics import histogram_observe, counter_add, count_error
|
||||||
|
|
||||||
|
@ -366,9 +365,9 @@ class ResultContainer:
|
||||||
result['score'] = result_score(result, result.get('priority'))
|
result['score'] = result_score(result, result.get('priority'))
|
||||||
# removing html content and whitespace duplications
|
# removing html content and whitespace duplications
|
||||||
if result.get('content'):
|
if result.get('content'):
|
||||||
result['content'] = utils.html_to_text(result['content']).strip()
|
result['content'] = result['content'].strip()
|
||||||
if result.get('title'):
|
if result.get('title'):
|
||||||
result['title'] = ' '.join(utils.html_to_text(result['title']).strip().split())
|
result['title'] = ' '.join(result['title'].strip().split())
|
||||||
|
|
||||||
for result_engine in result['engines']:
|
for result_engine in result['engines']:
|
||||||
counter_add(result['score'], 'engine', result_engine, 'score')
|
counter_add(result['score'], 'engine', result_engine, 'score')
|
||||||
|
|
Loading…
Add table
Reference in a new issue