[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

@@ -17,7 +17,6 @@ import typing as t
import re
from urllib.parse import quote_plus, urljoin
from lxml import html
from searx.utils import html_to_text, extract_text, eval_xpath
from searx.result_types import EngineResults
@@ -81,7 +80,7 @@ def _fetch_first_page_link(
if resp.status_code != 200:
logger.error("vqd: got HTTP %s from duckduckgo.com", resp.status_code)
dom = html.fromstring(resp.text)
dom = resp.html()
first_page_link = extract_text(eval_xpath(dom, "//link[@id='deep_preload_link']/@href"))
if not first_page_link: