diff options
author | Alexandre Flament <alex@al-f.net> | 2023-01-28 10:24:14 +0000 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2023-01-28 10:24:14 +0000 |
commit | 37addec69e4211aac6b2302c82cb5c5c7b1d5e04 (patch) | |
tree | 52ce990fd7903fe9ae5407274057153f62ab9654 /searx/network | |
parent | 6b71721ce80948d72ad656620a35507b73fc55d4 (diff) | |
download | searxng-37addec69e4211aac6b2302c82cb5c5c7b1d5e04.tar.gz searxng-37addec69e4211aac6b2302c82cb5c5c7b1d5e04.zip |
search.suspended_time settings: bug fixes
* fix type in settings.yml: replace suspend_times by suspended_times
* always use delay defined in settings.yml:
* HTTP status 402 and 403: read the value from settings.yml instead of using the hardcoded value of 1 day.
* startpage engine: CAPTCHA suspend the engine for one day instead of one week
Diffstat (limited to 'searx/network')
-rw-r--r-- | searx/network/raise_for_httperror.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/searx/network/raise_for_httperror.py b/searx/network/raise_for_httperror.py index 7fc2b7877..9f847d436 100644 --- a/searx/network/raise_for_httperror.py +++ b/searx/network/raise_for_httperror.py @@ -72,9 +72,7 @@ def raise_for_httperror(resp): if resp.status_code and resp.status_code >= 400: raise_for_captcha(resp) if resp.status_code in (402, 403): - raise SearxEngineAccessDeniedException( - message='HTTP error ' + str(resp.status_code), suspended_time=3600 * 24 - ) + raise SearxEngineAccessDeniedException(message='HTTP error ' + str(resp.status_code)) if resp.status_code == 429: raise SearxEngineTooManyRequestsException() resp.raise_for_status() |