Commit Graph

9 Commits (master)

Author SHA1 Message Date
Léon Tiekötter 0cedb1c6d8 Add search.suspended_times settings
Make suspended_time changeable in settings.yml
Allow different values to be set for different exceptions.

Co-authored-by: Alexandre Flament <alex@al-f.net>
1 year ago
Martin Fischer 640c404844 [pyright:strict] searx.search.checker.background 2 years ago
Markus Heiser 3d96a9839a [format.python] initial formatting of the python code
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>
2 years ago
Alexandre Flament d703119d3a [enh] add raise_for_httperror
check HTTP response:
* detect some comme CAPTCHA challenge (no solving). In this case the engine is suspended for long a time.
* otherwise raise HTTPError as before

the check is done in poolrequests.py (was before in search.py).

update qwant, wikipedia, wikidata to use raise_for_httperror instead of raise_for_status
3 years ago
Alexandre Flament 1d0c368746 [enh] record details exception per engine
add an new API /stats/errors
4 years ago
Alexandre Flament 1cfe7f2a75 [enh] settings.yml: add use_default_settings option
This change is backward compatible with the existing configurations.

If a settings.yml loaded from an user defined location (SEARX_SETTINGS_PATH or /etc/searx/settings.yml),
then this settings can relied on the default settings.yml with this option:
user_default_settings:True
4 years ago
Dalf 7888377743 Drop Python 2 (3/n): objects 4 years ago
Adam Tauber 27ed31c7a2 [fix] add message to SearxParameterException - fixes #1722 5 years ago
Alexandre Flament 15eef0ebdb [enh] validate input and raise an exception inside search.py. The exception message is output in json and rss format. 7 years ago