mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 10:02:20 +02:00
[feat] videos template: support for view count
This commit is contained in:
parent
3f22dbb68a
commit
304ddd8114
6 changed files with 23 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue