forked from zaclys/searxng
ef81d14ccf
When a user selects an unknown or invalid locale by using the search syntax: !qw siemens :de-TW Before this patch a UnknownLocaleError exception will be rasied: ``` Traceback (most recent call last): File "SearXNG/searx/search/processors/online.py", line 154, in search search_results = self._search_basic(query, params) File "SearXNG/searx/search/processors/online.py", line 128, in _search_basic self.engine.request(query, params) File "SearXNG/searx/engines/qwant.py", line 98, in request q_locale = get_engine_locale(params['language'], supported_languages, default='en_US') File "SearXNG/searx/locales.py", line 216, in get_engine_locale locale = babel.Locale.parse(searxng_locale, sep='-') File "SearXNG/local/py3/lib/python3.8/site-packages/babel/core.py", line 330, in parse raise UnknownLocaleError(input_id) ``` This patch implements a simple exception handling, since e.g. `de-TW` does not exists `de` will be used to get engines locale. On invalid terms like `xy-XY` the default will be returned. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> |
||
---|---|---|
.github | ||
dockerfiles | ||
docs | ||
examples | ||
searx | ||
searxng_extra | ||
src/brand | ||
tests | ||
utils | ||
.coveragerc | ||
.dir-locals.el | ||
.dockerignore | ||
.gitattributes | ||
.gitignore | ||
.nvmrc | ||
.pylintrc | ||
.weblate | ||
.yamllint.yml | ||
AUTHORS.rst | ||
CHANGELOG.rst | ||
CONTRIBUTING.md | ||
Dockerfile | ||
LICENSE | ||
Makefile | ||
PULL_REQUEST_TEMPLATE.md | ||
README.rst | ||
SECURITY.md | ||
babel.cfg | ||
manage | ||
package.json | ||
pyrightconfig-ci.json | ||
pyrightconfig.json | ||
requirements-dev.txt | ||
requirements.txt | ||
setup.py |
README.rst
Privacy-respecting, hackable metasearch engine
If you are looking for running instances, ready to use, then visit searx.space. Otherwise jump to the user, admin and developer handbooks you will find on our homepage.
Contact
Come join us if you have questions or just want to chat about SearXNG.
- Matrix
- IRC
#searxng on libera.chat which is bridged to Matrix.
Differences to searx
SearXNG is a fork of searx. Here are some of the changes:
User experience
- Huge update of the simple theme:
- usable on desktop, tablet and mobile
- light and dark versions (you can choose in the preferences)
- support right-to-left languages
- see the screenshots
- the translations are up to date, you can contribute on Weblate
- the preferences page has been updated:
- you can see which engines are reliable or not
- engines are grouped inside each tab
- each engine has a description
- thanks to the anonymous metrics, it is easier to report a bug of an engine and thus engines get fixed more quickly
- if you don't want any metrics to be recorded, you can disable them on the server
- administrator can block and/or replace the URLs in the search results
Setup
- you don't need Morty to proxy the images even on a public instance
- you don't need Filtron to block bots, we implemented the builtin limiter
- you get a well maintained Docker image, now also built for ARM64 and ARM/v7 architectures
- alternatively we have up to date installation scripts
Contributing is easier
- readable debug log
- contributions to the themes are made easier, check out our Development Quickstart guide
- a lot of code cleanup and bug fixes
- the dependencies are up to date
Translations
We need translators, suggestions are welcome at https://weblate.bubu1.eu/projects/searxng/searxng/
Make a donation
You can support the SearXNG project by clicking on the donation page: https://docs.searxng.org/donate.html