summaryrefslogtreecommitdiff
path: root/searx/autocomplete.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-03-18 19:59:01 +0100
committerAlexandre Flament <alex@al-f.net>2021-04-10 15:38:33 +0200
commiteaa694fb7d0e47b943bc6d6edb6cb6a40ab2d85e (patch)
tree024786c8a7003be24bbc566cb8c8e734a143f99d /searx/autocomplete.py
parent111180705b6f3b142732eb6325de1346f6372828 (diff)
downloadsearxng-eaa694fb7d0e47b943bc6d6edb6cb6a40ab2d85e.tar.gz
searxng-eaa694fb7d0e47b943bc6d6edb6cb6a40ab2d85e.zip
[enh] replace requests by httpx
Diffstat (limited to 'searx/autocomplete.py')
-rw-r--r--searx/autocomplete.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/autocomplete.py b/searx/autocomplete.py
index 75992a1d8..1fe3afac7 100644
--- a/searx/autocomplete.py
+++ b/searx/autocomplete.py
@@ -20,7 +20,8 @@ from lxml import etree
from json import loads
from urllib.parse import urlencode
-from requests import RequestException
+from httpx import HTTPError
+
from searx import settings
from searx.poolrequests import get as http_get
@@ -136,5 +137,5 @@ def search_autocomplete(backend_name, query, lang):
try:
return backend(query, lang)
- except (RequestException, SearxEngineResponseException):
+ except (HTTPError, SearxEngineResponseException):
return []