mirror of
https://github.com/searxng/searxng.git
synced 2026-09-27 00:26:09 +00:00
[mod] migration of some engine results to the video class (#6743)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
committed by
Markus Heiser
parent
ce48993997
commit
2e41cf7407
@@ -119,8 +119,7 @@ def _video_results(doc: ElementType, res: EngineResults):
|
||||
continue
|
||||
title_parts: list[ElementType] = eval_xpath(result, ".//a[starts-with(@class, 'tMMReshl')]")
|
||||
res.add(
|
||||
res.types.LegacyResult(
|
||||
template="videos.html",
|
||||
res.types.Video(
|
||||
url=url,
|
||||
title=" - ".join(extract_text(part) or "" for part in title_parts),
|
||||
thumbnail=extract_text(eval_xpath(result, ".//img/@src") or "") or "",
|
||||
|
||||
Reference in New Issue
Block a user