From 46e131fdadd94910c0e258aa4e855ad8019edbf7 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Mon, 7 Feb 2022 16:16:57 +0100 Subject: [mod] result_templates/videos.html: replace embedded HTML by data_src Embedded HTML breaks SearXNG architecture. To modularize, HTML is generated in the templates (oscar & simple) and result parameter 'embedded' is replaced by 'data_src', an URL for embedded content (' -) - base_youtube_url = 'https://www.youtube.com/watch?v=' @@ -77,8 +70,6 @@ def response(resp): url = base_youtube_url + videoid - embedded = embedded_url.format(videoid=videoid) - # append result results.append( { @@ -87,7 +78,7 @@ def response(resp): 'content': content, 'template': 'videos.html', 'publishedDate': publishedDate, - 'embedded': embedded, + 'data_src': "https://www.youtube-nocookie.com/embed/" + videoid, 'thumbnail': thumbnail, } ) -- cgit v1.2.3