summaryrefslogtreecommitdiff
path: root/searx/engines/youtube_noapi.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-06-10 07:25:44 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2020-06-10 07:25:44 +0200
commite088b95e74882818a611e5c46593914495daf9fe (patch)
tree323b7e5ae3a5497a632130fd9f16f4edcd4f312d /searx/engines/youtube_noapi.py
parentd065b9e4fbd4117e6f1cf565db1fbce6a0f89055 (diff)
parentaa7c043ff40bd1c1ec2e81748627aeac24608580 (diff)
Merge branch 'master' of https://github.com/asciimoo/searx into csp-oscar-theme
Diffstat (limited to 'searx/engines/youtube_noapi.py')
-rw-r--r--searx/engines/youtube_noapi.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/searx/engines/youtube_noapi.py b/searx/engines/youtube_noapi.py
index 49d0ae604..68a3739a2 100644
--- a/searx/engines/youtube_noapi.py
+++ b/searx/engines/youtube_noapi.py
@@ -70,11 +70,15 @@ def response(resp):
title = get_text_from_json(video.get('title', {}))
content = get_text_from_json(video.get('descriptionSnippet', {}))
embedded = embedded_url.format(videoid=videoid)
+ author = get_text_from_json(video.get('ownerText', {}))
+ length = get_text_from_json(video.get('lengthText', {}))
# append result
results.append({'url': url,
'title': title,
'content': content,
+ 'author': author,
+ 'length': length,
'template': 'videos.html',
'embedded': embedded,
'thumbnail': thumbnail})