[feat] videos template: support for view count

This commit is contained in:
Bnyro 2024-07-20 21:27:12 +02:00 committed by Markus Heiser
parent 3f22dbb68a
commit 304ddd8114
6 changed files with 23 additions and 2 deletions

View file

@ -7,6 +7,8 @@ import random
from urllib.parse import quote_plus, urlparse
from dateutil import parser
from searx.utils import humanize_number
# about
about = {
"website": 'https://api.invidious.io/',
@ -91,7 +93,8 @@ def response(resp):
"url": url,
"title": result.get("title", ""),
"content": result.get("description", ""),
'length': length,
"length": length,
"views": humanize_number(result['viewCount']),
"template": "videos.html",
"author": result.get("author"),
"publishedDate": publishedDate,