mirror of
https://github.com/searxng/searxng.git
synced 2025-07-24 13:49:26 +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
|
@ -53,6 +53,8 @@ from urllib.parse import urlencode
|
|||
import datetime
|
||||
from dateutil import parser
|
||||
|
||||
from searx.utils import humanize_number
|
||||
|
||||
# about
|
||||
about = {
|
||||
"website": 'https://github.com/TeamPiped/Piped/',
|
||||
|
@ -138,6 +140,7 @@ def response(resp):
|
|||
"title": result.get("title", ""),
|
||||
"publishedDate": parser.parse(time.ctime(uploaded / 1000)) if uploaded != -1 else None,
|
||||
"iframe_src": _frontend_url() + '/embed' + result.get("url", ""),
|
||||
"views": humanize_number(result["views"]),
|
||||
}
|
||||
length = result.get("duration")
|
||||
if length:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue