[fix] findfiles images: crashes due to changed HTML layout

This commit is contained in:
Bnyro
2026-09-18 11:30:49 +02:00
parent 0d6910ae5a
commit 96c35f1ed3

View File

@@ -81,8 +81,8 @@ def response(resp: "SXNG_Response") -> EngineResults:
):
res.add(
res.types.Image(
url=extract_text(eval_xpath(result, ".//div[contains(@class, 'caption')]/a/@href")) or "",
title=extract_text(eval_xpath(result, ".//div[contains(@class, 'caption')]/a")) or "",
url=extract_text(eval_xpath(result, ".//figcaption/a/@href")) or "",
title=extract_text(eval_xpath(result, ".//figcaption/a")) or "",
thumbnail_src=extract_text(eval_xpath(result, ".//img/@src")) or "",
)
)