summaryrefslogtreecommitdiff
path: root/searx/engines/piped.py
diff options
context:
space:
mode:
authorBnyro <bnyro@tutanota.com>2024-07-20 21:27:12 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2024-07-27 11:49:58 +0200
commit304ddd8114e12f4fdd5057dc933a2981bd9e1ec7 (patch)
tree036c00c01e08e1dd1eb1a6ee136f88d8d5871848 /searx/engines/piped.py
parent3f22dbb68ab1b1effa84048e15651c5b2e6aa160 (diff)
downloadsearxng-304ddd8114e12f4fdd5057dc933a2981bd9e1ec7.tar.gz
searxng-304ddd8114e12f4fdd5057dc933a2981bd9e1ec7.zip
[feat] videos template: support for view count
Diffstat (limited to 'searx/engines/piped.py')
-rw-r--r--searx/engines/piped.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/engines/piped.py b/searx/engines/piped.py
index 5b60dec5a..0b7199437 100644
--- a/searx/engines/piped.py
+++ b/searx/engines/piped.py
@@ -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: