diff options
| author | Markus Heiser <markus.heiser@darmarit.de> | 2022-02-07 16:16:57 +0100 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarit.de> | 2022-02-13 14:20:47 +0100 |
| commit | 46e131fdadd94910c0e258aa4e855ad8019edbf7 (patch) | |
| tree | 3e4de6dae4274331631bfefb3e3446e13bc9c022 /searx/engines/sepiasearch.py | |
| parent | a4942213a1dc6404616e239e0d2fb55a6e19a499 (diff) | |
[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 (<iframe>).
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines/sepiasearch.py')
| -rw-r--r-- | searx/engines/sepiasearch.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/searx/engines/sepiasearch.py b/searx/engines/sepiasearch.py index 00b1b3672..291277b1f 100644 --- a/searx/engines/sepiasearch.py +++ b/searx/engines/sepiasearch.py @@ -41,9 +41,6 @@ time_range_table = { } -embedded_url = '<iframe width="540" height="304" src="{url}" frameborder="0" allowfullscreen></iframe>' - - def minute_to_hm(minute): if isinstance(minute, int): return "%d:%02d" % (divmod(minute, 60)) @@ -88,7 +85,6 @@ def response(resp): content = result['description'] thumbnail = result['thumbnailUrl'] publishedDate = parser.parse(result['publishedAt']) - embedded = embedded_url.format(url=result.get('embedUrl')) author = result.get('account', {}).get('displayName') length = minute_to_hm(result.get('duration')) url = result['url'] @@ -102,7 +98,7 @@ def response(resp): 'length': length, 'template': 'videos.html', 'publishedDate': publishedDate, - 'embedded': embedded, + 'data_src': result.get('embedUrl'), 'thumbnail': thumbnail, } ) |