| 1234567891011121314151617181920212223242526272829303132333435 | # SPDX-License-Identifier: AGPL-3.0-or-later# pylint: disable=missing-module-docstringfrom flask_babel import gettextfrom searx.plugins import loggername = gettext('Hostname replace')description = "Deprecated / contact system admin to configure 'Hostnames plugin'!!"default_on = Falsepreference_section = 'general'plugin_id = 'hostname_replace'logger = logger.getChild(plugin_id)REPORTED = Falsedef deprecated_msg():    global REPORTED  # pylint: disable=global-statement    if REPORTED:        return    logger.error(        "'Hostname replace' plugin is deprecated and will be dropped soon!"        " Configure 'Hostnames plugin':"        " https://docs.searxng.org/src/searx.plugins.hostnames.html"    )    REPORTED = Truedef on_result(_request, _search, result):    # pylint: disable=import-outside-toplevel, cyclic-import    from searx.plugins.hostnames import on_result as hostnames_on_result    deprecated_msg()    return hostnames_on_result(_request, _search, result)
 |