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/vimeo.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/vimeo.py')
| -rw-r--r-- | searx/engines/vimeo.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/searx/engines/vimeo.py b/searx/engines/vimeo.py index 52d201eac..42cc4eecc 100644 --- a/searx/engines/vimeo.py +++ b/searx/engines/vimeo.py @@ -25,12 +25,6 @@ paging = True base_url = 'https://vimeo.com/' search_url = base_url + '/search/page:{pageno}?{query}' -embedded_url = ( - '<iframe data-src="https://player.vimeo.com/video/{videoid}" ' - + 'width="540" height="304" frameborder="0" ' - + 'webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>' -) - # do search-request def request(query, params): @@ -54,7 +48,6 @@ def response(resp): title = result['name'] thumbnail = result['pictures']['sizes'][-1]['link'] publishedDate = parser.parse(result['created_time']) - embedded = embedded_url.format(videoid=videoid) # append result results.append( @@ -64,7 +57,7 @@ def response(resp): 'content': '', 'template': 'videos.html', 'publishedDate': publishedDate, - 'embedded': embedded, + 'data_src': "https://player.vimeo.com/video/" + videoid, 'thumbnail': thumbnail, } ) |