[mod] network: migrate to curl_cffi

This commit is contained in:
vojkovic
2026-09-03 14:19:54 +00:00
committed by Brock Vojkovic
parent 15b0c8ef3a
commit be836e614a
39 changed files with 355 additions and 455 deletions

View File

@@ -42,18 +42,17 @@ exception_classname_to_text = {
None: gettext('unexpected crash'),
'timeout': timeout_text,
'asyncio.TimeoutError': timeout_text,
'httpx.TimeoutException': timeout_text,
'httpx.ConnectTimeout': timeout_text,
'httpx.ReadTimeout': timeout_text,
'httpx.WriteTimeout': timeout_text,
'httpx.HTTPStatusError': gettext('HTTP error'),
'httpx.ConnectError': gettext("HTTP connection error"),
'httpx.RemoteProtocolError': http_protocol_error_text,
'httpx.LocalProtocolError': http_protocol_error_text,
'httpx.ProtocolError': http_protocol_error_text,
'httpx.ReadError': network_error_text,
'httpx.WriteError': network_error_text,
'httpx.ProxyError': gettext("proxy error"),
'curl_cffi.requests.exceptions.Timeout': timeout_text,
'curl_cffi.requests.exceptions.ConnectTimeout': timeout_text,
'curl_cffi.requests.exceptions.ReadTimeout': timeout_text,
'curl_cffi.requests.exceptions.HTTPError': gettext('HTTP error'),
'curl_cffi.requests.exceptions.ConnectionError': gettext("HTTP connection error"),
'curl_cffi.requests.exceptions.DNSError': gettext("HTTP connection error"),
'curl_cffi.requests.exceptions.IncompleteRead': http_protocol_error_text,
'curl_cffi.requests.exceptions.SSLError': ssl_cert_error_text,
'curl_cffi.requests.exceptions.CertificateVerifyError': ssl_cert_error_text,
'curl_cffi.requests.exceptions.ProxyError': gettext("proxy error"),
'curl_cffi.requests.exceptions.RequestException': network_error_text,
'searx.exceptions.SearxEngineCaptchaException': gettext("CAPTCHA"),
'searx.exceptions.SearxEngineTooManyRequestsException': gettext("too many requests"),
'searx.exceptions.SearxEngineAccessDeniedException': gettext("access denied"),