mirror of
https://github.com/searxng/searxng.git
synced 2026-09-25 15:46:06 +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
@@ -127,7 +127,7 @@ from dateutil import parser
|
||||
from searx import locales, logger
|
||||
from searx.enginelib.traits import EngineTraits
|
||||
from searx.exceptions import SearxEngineResponseException
|
||||
from searx.result_types import EngineResults, MainResult
|
||||
from searx.result_types import EngineResults, MainResult, Video
|
||||
from searx.result_types.image import Image
|
||||
from searx.utils import html_to_text, js_obj_str_to_json_str, js_obj_str_to_python
|
||||
|
||||
@@ -331,8 +331,7 @@ def _parse_video_result(result: dict[str, t.Any]) -> MainResult:
|
||||
video: dict[str, t.Any] = result.get("video", {})
|
||||
thumbnail: dict[str, t.Any] = result.get("thumbnail", {})
|
||||
|
||||
return MainResult(
|
||||
template="videos.html",
|
||||
return Video(
|
||||
title=result.get("title", ""),
|
||||
url=result.get("url"),
|
||||
content=result.get("description", ""),
|
||||
|
||||
Reference in New Issue
Block a user