| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The exact order is
* first from SEARX_SETTINGS_PATH,
* if not found then from searx code base,
* if not found then from /etc/searx/settings.yml
* if not found an exception stops searx loading
|
| |
|