[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:
Markus Heiser
2026-09-20 16:20:15 +02:00
committed by Markus Heiser
parent ce48993997
commit 2e41cf7407
22 changed files with 93 additions and 132 deletions

View File

@@ -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", ""),