You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
searxng/searx
Markus Heiser 4845183128 [mod] don't dump traceback of SearxEngineResponseException on init
When initing engines a "SearxEngineResponseException" is logged very verbose,
including full traceback information:

    ERROR:searx.engines:yggtorrent engine: Fail to initialize
    Traceback (most recent call last):
      File "share/searx/searx/engines/__init__.py", line 293, in engine_init
        init_fn(get_engine_from_settings(engine_name))
      File "share/searx/searx/engines/yggtorrent.py", line 42, in init
        resp = http_get(url, allow_redirects=False)
      File "share/searx/searx/poolrequests.py", line 197, in get
        return request('get', url, **kwargs)
      File "share/searx/searx/poolrequests.py", line 190, in request
        raise_for_httperror(response)
      File "share/searx/searx/raise_for_httperror.py", line 60, in raise_for_httperror
        raise_for_captcha(resp)
      File "share/searx/searx/raise_for_httperror.py", line 43, in raise_for_captcha
        raise_for_cloudflare_captcha(resp)
      File "share/searx/searx/raise_for_httperror.py", line 30, in raise_for_cloudflare_captcha
        raise SearxEngineCaptchaException(message='Cloudflare CAPTCHA', suspended_time=3600 * 24 * 15)
    searx.exceptions.SearxEngineCaptchaException: Cloudflare CAPTCHA, suspended_time=1296000

For SearxEngineResponseException this is not needed.  Those types of exceptions
can be a normal use case.  E.g. for CAPTCHA errors like shown in the example
above. It should be enough to log a warning for such issues:

    WARNING:searx.engines:yggtorrent engine: Fail to initialize // Cloudflare CAPTCHA, suspended_time=1296000

closes: #2612

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
..
answerers [fix] answers: don't crash when the query is an empty string 3 years ago
data Merge pull request #2632 from searx/update_data_update_wikidata_units.py 3 years ago
engines [mod] don't dump traceback of SearxEngineResponseException on init 3 years ago
metrology [fix] checker: fix engine statistics 4 years ago
plugins [mod] pylint: numerous minor code fixes 4 years ago
search [mod] update currencies.json and fetch_currencies.py 3 years ago
shared [fix] checker: don't run the checker when uwsgi is not properly configured 4 years ago
static [mod] themes: remove legacy, courgette and pix-art themes 4 years ago
templates Merge pull request #2458 from MarcAbonce/hide-links-mobile2 4 years ago
translations [enh] update translations 4 years ago
__init__.py [mod] settings.yml: move brand settings to a dedicated section 4 years ago
autocomplete.py [enh] autocomplete refactoring, autocomplete on external bangs 3 years ago
exceptions.py [enh] add raise_for_httperror 4 years ago
external_bang.py [mod] add utils/fetch_external_bangs.py 3 years ago
external_urls.py [mod] add external_urls.json and wikidata_units.json 4 years ago
languages.py [data] make engines.languages 4 years ago
poolrequests.py [mod] poolrequests: for one (user request, engine) always use the same HTTPAdapter 3 years ago
preferences.py Patch advanced search preferences 4 years ago
query.py [enh] autocomplete refactoring, autocomplete on external bangs 3 years ago
raise_for_httperror.py [enh] add raise_for_httperror 4 years ago
results.py [mod] results: don't crash when an engine don't have a category 4 years ago
settings.yml [enh] google scholar - python implementation of the engine 3 years ago
settings_loader.py [fix] pylint: use "raise ... from ..." 4 years ago
settings_robot.yml Let admins lock user preferences 4 years ago
testing.py [py2to3] use unittest from py3, remove unittest2 from py2 3 years ago
utils.py [fix] pylint: use "raise ... from ..." 4 years ago
version.py prepare release 0.18.0 4 years ago
webadapter.py [fix] pylint: use "raise ... from ..." 4 years ago
webapp.py [enh] autocomplete refactoring, autocomplete on external bangs 3 years ago
webutils.py Updated webutils.highlight_content to ignore double-quotes when highlighting query parts 3 years ago