mirror of
https://github.com/searxng/searxng.git
synced 2026-09-23 06:36:12 +00:00
[fix] findfiles images: crashes due to changed HTML layout
This commit is contained in:
@@ -81,8 +81,8 @@ def response(resp: "SXNG_Response") -> EngineResults:
|
|||||||
):
|
):
|
||||||
res.add(
|
res.add(
|
||||||
res.types.Image(
|
res.types.Image(
|
||||||
url=extract_text(eval_xpath(result, ".//div[contains(@class, 'caption')]/a/@href")) or "",
|
url=extract_text(eval_xpath(result, ".//figcaption/a/@href")) or "",
|
||||||
title=extract_text(eval_xpath(result, ".//div[contains(@class, 'caption')]/a")) or "",
|
title=extract_text(eval_xpath(result, ".//figcaption/a")) or "",
|
||||||
thumbnail_src=extract_text(eval_xpath(result, ".//img/@src")) or "",
|
thumbnail_src=extract_text(eval_xpath(result, ".//img/@src")) or "",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user