summaryrefslogtreecommitdiff
path: root/searx/engines/youtube_noapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/youtube_noapi.py')
-rw-r--r--searx/engines/youtube_noapi.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/searx/engines/youtube_noapi.py b/searx/engines/youtube_noapi.py
index 49d0ae604..fef501458 100644
--- a/searx/engines/youtube_noapi.py
+++ b/searx/engines/youtube_noapi.py
@@ -10,9 +10,9 @@
from functools import reduce
from json import loads
+from urllib.parse import quote_plus
from searx.engines.xpath import extract_text
from searx.utils import list_get
-from searx.url_utils import quote_plus
# engine dependent config
categories = ['videos', 'music']
@@ -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})