Browse Source

[fix] presearch videos: item description and duration are located in metadata field

Bnyro 1 month ago
parent
commit
3668c7012e
1 changed files with 2 additions and 3 deletions
  1. 2 3
      searx/engines/presearch.py

+ 2 - 3
searx/engines/presearch.py

@@ -264,14 +264,13 @@ def response(resp):
         # a video and not to a video stream --> SearXNG can't use the video template.
         # a video and not to a video stream --> SearXNG can't use the video template.
 
 
         for item in json_resp.get('videos', []):
         for item in json_resp.get('videos', []):
-            metadata = [x for x in [item.get('description'), item.get('duration')] if x]
             results.append(
             results.append(
                 {
                 {
                     'title': html_to_text(item['title']),
                     'title': html_to_text(item['title']),
                     'url': item.get('link'),
                     'url': item.get('link'),
-                    'content': '',
-                    'metadata': ' / '.join(metadata),
+                    'content': item.get('description', ''),
                     'thumbnail': item.get('image'),
                     'thumbnail': item.get('image'),
+                    'length': item.get('duration'),
                 }
                 }
             )
             )