summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsearxng_extra/update/update_ahmia_blacklist.py4
1 files 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()