mirror of
https://github.com/searxng/searxng.git
synced 2025-07-13 00:09:18 +02:00
[enh] replace requests by httpx
This commit is contained in:
parent
111180705b
commit
eaa694fb7d
18 changed files with 527 additions and 204 deletions
|
@ -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 []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue