diff options
| author | Alexandre Flament <alex@al-f.net> | 2022-02-18 20:55:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-18 20:55:40 +0100 |
| commit | bf2a2ed48faf511a609d3b084b02066d69549015 (patch) | |
| tree | 5f916297681efb4b0b213e2ce8a01b0c0e3a3541 /searx/engines/dailymotion.py | |
| parent | c81b46150ec12b7d936fb218f447e1651826ff2a (diff) | |
| parent | 761885682d45b8a27c92eaec8ba769b03c22c9b1 (diff) | |
Merge pull request #882 from return42/fix-873
[fix] replace embedded HTML by data_src
Diffstat (limited to 'searx/engines/dailymotion.py')
| -rw-r--r-- | searx/engines/dailymotion.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/searx/engines/dailymotion.py b/searx/engines/dailymotion.py index 5607691a4..d71cdc114 100644 --- a/searx/engines/dailymotion.py +++ b/searx/engines/dailymotion.py @@ -25,11 +25,6 @@ paging = True # search-url # see http://www.dailymotion.com/doc/api/obj-video.html search_url = 'https://api.dailymotion.com/videos?fields=created_time,title,description,duration,url,thumbnail_360_url,id&sort=relevance&limit=5&page={pageno}&{query}' # noqa -embedded_url = ( - '<iframe frameborder="0" width="540" height="304" ' - + 'data-src="https://www.dailymotion.com/embed/video/{videoid}" allowfullscreen></iframe>' -) - 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, + 'iframe_src': "https://www.dailymotion.com/embed/video/" + res['id'], 'thumbnail': thumbnail, } ) |