@@ -6,8 +6,7 @@
6# @using-api yes
6# @using-api yes
7# @results JSON
7# @results JSON
8# @stable yes
8# @stable yes
9−# @parse url, title, content, publishedDate, thumbnail, embedded
9+# @parse url, title, content, publishedDate, thumbnail, embedded, author, length
10−# @parse url, title, content, publishedDate, thumbnail, embedded, author
12from searx.url_utils import quote_plus
11from searx.url_utils import quote_plus
13from dateutil import parser
12from dateutil import parser
@@ -85,12 +84,18 @@ def response(resp):
85 publishedDate = parser.parse(
84 publishedDate = parser.parse(
86 time.ctime(result.get("published", 0))
85 time.ctime(result.get("published", 0))
87+ length = time.gmtime(result.get("lengthSeconds"))
89+ length = time.strftime("%H:%M:%S", length)
91+ length = time.strftime("%M:%S", length)
89 results.append(
93 results.append(
91 "url": url,
95 "url": url,
92 "title": result.get("title", ""),
96 "title": result.get("title", ""),
93 "content": result.get("description", ""),
97 "content": result.get("description", ""),
94 "template": "videos.html",
99 "template": "videos.html",
95 "author": result.get("author"),
100 "author": result.get("author"),
96 "publishedDate": publishedDate,
101 "publishedDate": publishedDate,