diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000000..4dcf598903e2 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: [tiekoettercom] +custom: https://www.tiekoetter.com/donate/ diff --git a/searx/engines/wikipedia.py b/searx/engines/wikipedia.py index 187915d65f1e..18332bca9582 100644 --- a/searx/engines/wikipedia.py +++ b/searx/engines/wikipedia.py @@ -54,6 +54,7 @@ """ +import re import urllib.parse import babel @@ -186,9 +187,17 @@ def response(resp): _network.raise_for_httperror(resp) + from searx.preferences import hostname_replace_choice # pylint: disable=import-outside-toplevel + api_result = resp.json() title = utils.html_to_text(api_result.get('titles', {}).get('display') or api_result.get('title')) wikipedia_link = api_result['content_urls']['desktop']['page'] + if hostname_replace_choice == "on": + wikipedia_link = ( + re.sub(r'(.*\.)wikipedia\.org', 'https://wikiless.tiekoetter.com', wikipedia_link) + + "?lang=" + + api_result['content_urls']['desktop']['page'][8:10] + ) if "list" in display_type or api_result.get('type') != 'standard': # show item in the result list if 'list' is in the display options or it diff --git a/searx/infopage/de/donate.md b/searx/infopage/de/donate.md new file mode 100644 index 000000000000..555c84510113 --- /dev/null +++ b/searx/infopage/de/donate.md @@ -0,0 +1,5 @@ +# Spenden + +## An Tiekoetter.com spenden + +Tiekoetter.com unterstützen: [https://www.tiekoetter.com/spenden](https://www.tiekoetter.com/spenden) diff --git a/searx/infopage/en/donate.md b/searx/infopage/en/donate.md new file mode 100644 index 000000000000..2863fa6026b2 --- /dev/null +++ b/searx/infopage/en/donate.md @@ -0,0 +1,5 @@ +# Donate + +## Donate to Tiekoetter.com + +Support Tiekoetter.com: [https://www.tiekoetter.com/en/donate](https://www.tiekoetter.com/en/donate/) diff --git a/searx/network/network.py b/searx/network/network.py index 453c8d2fc061..b709188f5ae2 100644 --- a/searx/network/network.py +++ b/searx/network/network.py @@ -303,13 +303,6 @@ def get_network(name=None): def check_network_configuration(): async def check(): exception_count = 0 - for network in NETWORKS.values(): - if network.using_tor_proxy: - try: - await network.get_client() - except Exception: # pylint: disable=broad-except - network._logger.exception('Error') # pylint: disable=protected-access - exception_count += 1 return exception_count future = asyncio.run_coroutine_threadsafe(check(), get_loop()) diff --git a/searx/preferences.py b/searx/preferences.py index 4b7494ac2141..faf6460b0b5f 100644 --- a/searx/preferences.py +++ b/searx/preferences.py @@ -505,8 +505,17 @@ def parse_encoded_data(self, input_data: str): dict_data[x] = y[0] self.parse_dict(dict_data) + hostname_replace_choice = "off" + def parse_dict(self, input_data: Dict[str, str]): """parse preferences from request (``flask.request.form``)""" + + global hostname_replace_choice # pylint: disable=global-variable-undefined + if 'hostname_replace' in ','.join(self.plugins.enabled): + hostname_replace_choice = "on" + else: + hostname_replace_choice = "off" + for user_setting_name, user_setting in input_data.items(): if user_setting_name in self.key_value_settings: if self.key_value_settings[user_setting_name].locked: diff --git a/searx/settings.yml b/searx/settings.yml index 8b264eaf631f..1962e0355395 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -12,6 +12,8 @@ general: contact_url: false # record stats enable_metrics: true + legal_name: "" + legal_url: brand: new_issue_url: https://github.com/searxng/searxng/issues/new @@ -25,6 +27,9 @@ brand: # links: # Uptime: https://uptime.searxng.org/history/darmarit-org # About: "https://searxng.org" + website_name: "" + website_url: + donate_url: search: # Filter results. 0: None, 1: Moderate, 2: Strict diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html index 4aeab383a0a8..b470f76e88cd 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/simple/base.html @@ -4,7 +4,7 @@ - + @@ -65,13 +65,16 @@