summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2025-11-23 12:33:16 +0100
committerMarkus Heiser <markus.heiser@darmarIT.de>2025-11-25 06:25:45 +0100
commit2313b972a38170df5421839b911f942cb8ea4af3 (patch)
tree02b535b7d2ebd7c8fe037b8e18b16a93895d7d96
parent989b49335c54b23f274f0b969893a43de5b6c31c (diff)
[fix] engines: base URL can be a list or a string, but its not None!
The code injection and monkey patching examine the names in the module of the engine; if a variable there starts without an underscore and has the value None, then this variable needs to be configured. This outdated concept does not fit engines that may have multiple URLs. At least not as long as the value of the base URL (list) is None. The default is now an empty list instead of None Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
-rw-r--r--searx/engines/invidious.py2
-rw-r--r--searx/engines/piped.py2
-rw-r--r--searx/engines/pixiv.py2
-rw-r--r--searx/engines/yacy.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/searx/engines/invidious.py b/searx/engines/invidious.py
index 817c1d4ab..c62143ffc 100644
--- a/searx/engines/invidious.py
+++ b/searx/engines/invidious.py
@@ -31,7 +31,7 @@ paging = True
time_range_support = True
# base_url can be overwritten by a list of URLs in the settings.yml
-base_url: list | str = []
+base_url: list[str] | str = []
def init(_):
diff --git a/searx/engines/piped.py b/searx/engines/piped.py
index 564753494..e9585eae1 100644
--- a/searx/engines/piped.py
+++ b/searx/engines/piped.py
@@ -72,7 +72,7 @@ categories = []
paging = True
# search-url
-backend_url: list[str] | str | None = None
+backend_url: list[str] | str = []
"""Piped-Backend_: The core component behind Piped. The value is an URL or a
list of URLs. In the latter case instance will be selected randomly. For a
complete list of official instances see Piped-Instances (`JSON
diff --git a/searx/engines/pixiv.py b/searx/engines/pixiv.py
index abf316228..b1e7bf452 100644
--- a/searx/engines/pixiv.py
+++ b/searx/engines/pixiv.py
@@ -20,7 +20,7 @@ categories = ['images']
# Search URL
base_url = "https://www.pixiv.net/ajax/search/illustrations"
-pixiv_image_proxies: list = []
+pixiv_image_proxies: list[str] = []
def request(query, params):
diff --git a/searx/engines/yacy.py b/searx/engines/yacy.py
index e8ba1292a..6566dd0f6 100644
--- a/searx/engines/yacy.py
+++ b/searx/engines/yacy.py
@@ -96,7 +96,7 @@ search_type = 'text'
``video`` are not yet implemented (Pull-Requests are welcome).
"""
-base_url: list[str] | str | None = None
+base_url: list[str] | str = []
"""The value is an URL or a list of URLs. In the latter case instance will be
selected randomly.
"""