sfdsdf
This commit is contained in:
parent
b65a31dfc5
commit
3e70adca36
2 changed files with 7 additions and 1 deletions
|
@ -251,6 +251,12 @@ def sanitize(sanitized, noimages=False):
|
|||
htmlsource = f'<div style="padding-top:5px; padding-bottom: 10px;"><iframe style="max-width:100%" frameborder="0" src="{url}?controls=0"></iframe></div>'
|
||||
sanitized = sanitized.replace(replacing, htmlsource)
|
||||
|
||||
for i in re.finditer('<a target="_blank" rel="nofollow noopener noreferrer" href="(https:.*?\.mp4)"', sanitized):
|
||||
url = i.group(1)
|
||||
replacing = f'<a target="_blank" rel="nofollow noopener noreferrer" href="{url}">{url}</a>'
|
||||
htmlsource = f'<video controls="" preload="metadata" style="max-width: 100%"><source src="{url}" type="video/mp4"></video>'
|
||||
sanitized = sanitized.replace(replacing, htmlsource)
|
||||
|
||||
for i in re.finditer('<a href="(https://open.spotify.com/embed/.*?)"', sanitized):
|
||||
url = i.group(1)
|
||||
replacing = f'<a href="{url}" target="_blank">{url}</a>'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue