From 6c062862513dcaeebeb497ba1c61ea83e3a9e50b Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Tue, 9 Jun 2020 20:31:51 +0200 Subject: [enh] add length and author details to youtube videos closes #775 --- searx/engines/youtube_noapi.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'searx/engines') 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}) -- cgit v1.2.3