SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
include length in invidious results
Michael Ilsaas2ed8ad76917e
diff --git a/searx/engines/invidious.py b/searx/engines/invidious.pyindex e94d7c17d..cf76fd215 100644--- a/searx/engines/invidious.py+++ b/searx/engines/invidious.py@@ -6,8 +6,7 @@# @using-api yes# @results JSON# @stable yes-# @parse url, title, content, publishedDate, thumbnail, embedded-# @parse url, title, content, publishedDate, thumbnail, embedded, author+# @parse url, title, content, publishedDate, thumbnail, embedded, author, lengthfrom searx.url_utils import quote_plusfrom dateutil import parser@@ -85,12 +84,18 @@ def response(resp):publishedDate = parser.parse(time.ctime(result.get("published", 0)))+ length = time.gmtime(result.get("lengthSeconds"))+ if length.tm_hour:+ length = time.strftime("%H:%M:%S", length)+ else:+ length = time.strftime("%M:%S", length)results.append({"url": url,"title": result.get("title", ""),"content": result.get("description", ""),+ 'length': length,"template": "videos.html","author": result.get("author"),"publishedDate": publishedDate,