[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 @@ Implementations
import typing as t
from datetime import datetime
from lxml import html
from flask_babel import gettext # pyright: ignore[reportUnknownVariableType]
from searx.network import get
@@ -70,7 +69,7 @@ def get_ui_version() -> str:
if not resp.ok:
raise RuntimeError("Can't determine Semantic Scholar UI version")
doc = html.fromstring(resp.text)
doc = resp.html()
ret_val = eval_xpath_getindex(doc, "//meta[@name='s2-ui-version']/@content", 0)
if not ret_val:
raise RuntimeError("Can't determine Semantic Scholar UI version")