[mod] network: migrate to curl_cffi

This commit is contained in:
vojkovic authored and Brock Vojkovic committed 2026-09-04 16:16:09 +08:00
1 parent 15b0c8ef3a
commit be836e614a
39 files changed
+355 -455

No files matched your search

+2 -2
View File
@@ -9,7 +9,7 @@ import typing
import re
from flask_babel import gettext
from httpx import HTTPError
from curl_cffi.requests.exceptions import RequestException
from searx.network import get
from searx.plugins import Plugin, PluginInfo
@@ -59,7 +59,7 @@ class SXNGPlugin(Plugin):
resp = get(url_exit_list)
node_list = re.findall(reg, resp.text) # type: ignore
except HTTPError:
except RequestException:
# No answer, return error
msg = gettext("Could not download the list of Tor exit-nodes from")
results.add(results.types.Answer(answer=f"{msg} {url_exit_list}"))