[mod] swisscows WEB: ignore video results from the first page

On the first page of the WEB search, there are, among other things, sections for
videos and news.  The video results from these sections should not be used as
results in the WEB search of SearXNG.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser
2026-06-05 14:34:27 +02:00
committed by Bnyro
parent e7cf57e9ae
commit 0429198415
+1 -1
View File
@@ -266,7 +266,7 @@ def response(resp: "SXNG_Response") -> EngineResults:
thumbnail=result.get("thumbnail", {}).get("url"),
)
)
elif result["type"] == "VideoCollection":
elif swisscows_category == "videos" and result["type"] == "VideoCollection":
for video in result["hasPart"]:
res.add(_video_result(video))
elif result["type"] == "ImageObject":