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 (' -) - supported_languages_url = 'https://api.dailymotion.com/languages' @@ -64,7 +59,6 @@ def response(resp): content = html_to_text(res['description']) thumbnail = res['thumbnail_360_url'] publishedDate = datetime.fromtimestamp(res['created_time'], None) - embedded = embedded_url.format(videoid=res['id']) # http to https thumbnail = thumbnail.replace("http://", "https://") @@ -76,7 +70,7 @@ def response(resp): 'title': title, 'content': content, 'publishedDate': publishedDate, - 'embedded': embedded, + 'data_src': "https://www.dailymotion.com/embed/video/" + res['id'], 'thumbnail': thumbnail, } ) -- cgit v1.2.3