[refactor] engines: migrate to SXNG_Response.html() (#6718)

This commit is contained in:
Bnyro
2026-09-13 14:01:58 +02:00
parent 3169aafd28
commit 274b63b677
75 changed files with 102 additions and 178 deletions

View File

@@ -26,7 +26,6 @@ import typing as t
from urllib.parse import urlencode
from datetime import datetime
from lxml import html
from curl_cffi.requests.exceptions import TooManyRedirects
from searx.utils import (
@@ -106,7 +105,7 @@ def response(resp: "SXNG_Response") -> EngineResults: # pylint: disable=too-man
raise TooManyRedirects(f"location {resp.headers['Location'].split('?')[0]}")
res = EngineResults()
dom = html.fromstring(resp.text)
dom = resp.html()
detect_google_captcha(dom)
# parse results