From c48993452f840f92ce1fd02b79febd17c515c038 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 29 Oct 2025 08:15:28 +0100 Subject: [PATCH] [fix] update_ahmia_blacklist.py - `User-Agent` become required The User-Agent header recently become required to fetch blacklist from URL https://ahmia.fi/blacklist/ [1] https://github.com/searxng/searxng/actions/runs/18892940199/job/53924400294 Signed-off-by: Markus Heiser --- searxng_extra/update/update_ahmia_blacklist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searxng_extra/update/update_ahmia_blacklist.py b/searxng_extra/update/update_ahmia_blacklist.py index c890b3760..969f9aeb6 100755 --- a/searxng_extra/update/update_ahmia_blacklist.py +++ b/searxng_extra/update/update_ahmia_blacklist.py @@ -18,10 +18,10 @@ URL = 'https://ahmia.fi/blacklist/banned/' def fetch_ahmia_blacklist(): - resp = requests.get(URL, timeout=3.0) + resp = requests.get(URL, timeout=3.0, headers={"User-Agent": "SearXNG"}) if resp.status_code != 200: # pylint: disable=broad-exception-raised - raise Exception("Error fetching Ahmia blacklist, HTTP code " + resp.status_code) # type: ignore + raise Exception("Error fetching Ahmia blacklist, HTTP code " + str(resp.status_code)) return resp.text.split()