[enh] add hostname_replace plugin

* backport of https://github.com/searx/searx/pull/2724
* allow to remove result if the replacement is the boolean value false
This commit is contained in:
Alexandre Flament 2021-09-10 12:43:33 +02:00
parent b671e0364f
commit 0f43b39eac
4 changed files with 49 additions and 5 deletions

View file

@ -150,7 +150,17 @@ outgoing:
#
# enabled_plugins:
# - "HTTPS rewrite"
# - ...
# - "Hostname replace" # see configuration below
# "Hostname replace" plugin configuration example:
# hostname_replace:
# '(.*\.)?youtube\.com$': 'invidious.example.com'
# '(.*\.)?youtu\.be$': 'invidious.example.com'
# '(.*\.)?youtube-noocookie\.com$': 'yotter.example.com'
# '(.*\.)?reddit\.com$': 'teddit.example.com'
# '(.*\.)?redd\.it$': 'teddit.example.com'
# '(www\.)?twitter\.com$': 'nitter.example.com'
# 'spam\.example\.com': false # remove results from spam.example.com
checker:
# disable checker when in debug mode