Age | Commit message (Collapse) | Author |
|
Remove issue reported by Pylint 2.14.0:
- no-self-use: has been moved to optional extension [1]
- The refactoring checker now also raises 'consider-using-generator' messages
for max(), min() and sum(). [2]
.pylintrc:
- <option name>-hint has been removed since long, Pylint 2.14.0 raises an
error on invalid options
- bad-continuation and bad-whitespace have been removed [3]
[1] https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers
[2] https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/full.html#what-s-new-in-pylint-2-14-0
[2] https://pylint.pycqa.org/en/latest/whatsnew/2/2.6/summary.html#summary-release-highlights
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
|
|
This module is a toolbox for the engines.
Is should be documented.
In addition, searx/utils.py is checked by pylint.
|
|
This patch was generated by black [1]::
make format.python
[1] https://github.com/psf/black
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
pybabel separates locales with underscores but we use hyphens
everywhere babel doesn't directly touch
|
|
The utils.load_module() function is used to load a python file (aka module) and
return the module's namespace. SearXNG uses this function to load *engines and
answerers* from arbitrary locations with arbitrary modifications. These are not
real python modules and it is not intended to mix this *engines and answerers*
with the python modules registered in sys.modules.
Closes: https://github.com/searxng/searxng/issues/312
Suggested-by: @dalf in https://github.com/searxng/searxng/issues/312
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
This commit remove the need to update the brand for GIT_URL and GIT_BRANCH:
there are read from the git repository.
It is possible to call python -m searx.version freeze to freeze the current version.
Useful when the code is installed outside git (distro package, docker, etc...)
|
|
h11 (used by httpx) rejects HTTP request with a trailing space in HTTP headers
|
|
|
|
In a comment [1] dalf suggested to avoid a recursion of get_value()
[1] https://github.com/searxng/searxng/pull/99#discussion_r640833716
Suggested-by: Alexandre Flament <alex@al-f.net>
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
Access to formats can be denied by settings configuration::
search:
formats: [html, csv, json, rss]
Closes: https://github.com/searxng/searxng/issues/95
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
|
|
remove unused function searx.utils.list_get
|
|
add an new API /stats/errors
|
|
|
|
use
from searx.engines.duckduckgo import _fetch_supported_languages, supported_languages_url # NOQA
so it is possible to easily remove all unused import using autoflake:
autoflake --in-place --recursive --remove-all-unused-imports searx tests
|
|
various bug fixes
|
|
Instead of loading the data/*.json in different location,
load these files in the new searx.data module.
|
|
imp.load_source is not documented in Python 3
see documentation : https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly
partial fix of https://github.com/searx/searx/issues/1674
|
|
* The hack for Yahoo URLs is not necessary anymore. (see searx.engines.yahoo.parse_url)
* move the URL normalization in extract_url to normalize_url
|
|
|
|
|
|
contains utility functions and classes used only by webapp.py
|
|
Close #2188
|
|
instead of bytes
Fix bug in translated.py and dictzone.py
|
|
|
|
|
|
compile XPath only once
avoid redundant call to urlparse
get_locale(webapp.py): avoid useless call to request.accept_languages.best_match
|
|
|
|
|
|
|
|
Characters that were not ASCII were incorrectly decoded.
Add an helper function: searx.utils.ecma_unescape (Python implementation of unescape Javascript function).
|
|
significantly
|
|
Fix #1600
In settings.yml, the secret_key can be written as string or as base64 encoded data using !!binary notation.
|
|
|
|
|
|
Fix bing "garbage" results
|
|
this fixes duckduckgo error response
|
|
|
|
|
|
Add match_language function in utils to match any user given
language code with a list of engine's supported languages.
Also add language_aliases dict on each engine to translate
standard language codes into the custom codes used by the engine.
|
|
|
|
|
|
|
|
|
|
|