mirror of https://gitlab.com/bashrc2/epicyon
Remove href
parent
2ad1b51f9a
commit
af10d731a2
|
@ -1191,14 +1191,18 @@ def addEmbeddedAudio(content: str) -> str:
|
||||||
for w in words:
|
for w in words:
|
||||||
if extension not in w:
|
if extension not in w:
|
||||||
continue
|
continue
|
||||||
|
w=w.replace('href="','')
|
||||||
if w.endswith('.'):
|
if w.endswith('.'):
|
||||||
w=w[:-1]
|
w=w[:-1]
|
||||||
|
if w.endswith('"'):
|
||||||
|
w=w[:-1]
|
||||||
if w.endswith(';'):
|
if w.endswith(';'):
|
||||||
w=w[:-1]
|
w=w[:-1]
|
||||||
if w.endswith(':'):
|
if w.endswith(':'):
|
||||||
w=w[:-1]
|
w=w[:-1]
|
||||||
if not w.endswith(extension):
|
if not w.endswith(extension):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not (w.startswith('http') or w.startswith('dat:') or '/' in w):
|
if not (w.startswith('http') or w.startswith('dat:') or '/' in w):
|
||||||
continue
|
continue
|
||||||
url=w
|
url=w
|
||||||
|
@ -1224,8 +1228,11 @@ def addEmbeddedVideo(content: str,width=400,height=300) -> str:
|
||||||
for w in words:
|
for w in words:
|
||||||
if extension not in w:
|
if extension not in w:
|
||||||
continue
|
continue
|
||||||
|
w=w.replace('href="','')
|
||||||
if w.endswith('.'):
|
if w.endswith('.'):
|
||||||
w=w[:-1]
|
w=w[:-1]
|
||||||
|
if w.endswith('"'):
|
||||||
|
w=w[:-1]
|
||||||
if w.endswith(';'):
|
if w.endswith(';'):
|
||||||
w=w[:-1]
|
w=w[:-1]
|
||||||
if w.endswith(':'):
|
if w.endswith(':'):
|
||||||
|
|
Loading…
Reference in New Issue