diff options
author | Bnyro <bnyro@tutanota.com> | 2024-07-20 21:27:12 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2024-07-27 11:49:58 +0200 |
commit | 304ddd8114e12f4fdd5057dc933a2981bd9e1ec7 (patch) | |
tree | 036c00c01e08e1dd1eb1a6ee136f88d8d5871848 /searx/engines/invidious.py | |
parent | 3f22dbb68ab1b1effa84048e15651c5b2e6aa160 (diff) | |
download | searxng-304ddd8114e12f4fdd5057dc933a2981bd9e1ec7.tar.gz searxng-304ddd8114e12f4fdd5057dc933a2981bd9e1ec7.zip |
[feat] videos template: support for view count
Diffstat (limited to 'searx/engines/invidious.py')
-rw-r--r-- | searx/engines/invidious.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/engines/invidious.py b/searx/engines/invidious.py index 49f90cc09..540f89a2f 100644 --- a/searx/engines/invidious.py +++ b/searx/engines/invidious.py @@ -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, |