summaryrefslogtreecommitdiff
path: root/searx/engines/peertube.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2022-02-18 20:55:40 +0100
committerGitHub <noreply@github.com>2022-02-18 20:55:40 +0100
commitbf2a2ed48faf511a609d3b084b02066d69549015 (patch)
tree5f916297681efb4b0b213e2ce8a01b0c0e3a3541 /searx/engines/peertube.py
parentc81b46150ec12b7d936fb218f447e1651826ff2a (diff)
parent761885682d45b8a27c92eaec8ba769b03c22c9b1 (diff)
downloadsearxng-bf2a2ed48faf511a609d3b084b02066d69549015.tar.gz
searxng-bf2a2ed48faf511a609d3b084b02066d69549015.zip
Merge pull request #882 from return42/fix-873
[fix] replace embedded HTML by data_src
Diffstat (limited to 'searx/engines/peertube.py')
-rw-r--r--searx/engines/peertube.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/searx/engines/peertube.py b/searx/engines/peertube.py
index 1ace14027..089775694 100644
--- a/searx/engines/peertube.py
+++ b/searx/engines/peertube.py
@@ -51,12 +51,6 @@ def response(resp):
search_res = loads(resp.text)
- embedded_url = (
- '<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" '
- + 'src="'
- + sanitized_url
- + '{embed_path}" frameborder="0" allowfullscreen></iframe>'
- )
# return empty array if there are no results
if "data" not in search_res:
return []
@@ -72,7 +66,6 @@ def response(resp):
content = ""
thumbnail = sanitized_url + res["thumbnailPath"]
publishedDate = datetime.strptime(res["publishedAt"], "%Y-%m-%dT%H:%M:%S.%fZ")
- embedded = embedded_url.format(embed_path=res["embedPath"])
results.append(
{
@@ -81,7 +74,7 @@ def response(resp):
"title": title,
"content": content,
"publishedDate": publishedDate,
- "embedded": embedded,
+ "iframe_src": sanitized_url + res["embedPath"],
"thumbnail": thumbnail,
}
)