Compare commits
3 Commits
5b3e12ec4b
...
6350a7851c
| Author | SHA1 | Date | |
|---|---|---|---|
| 6350a7851c | |||
| afeb59d0c1 | |||
|
|
56ef299c5d |
@ -188,6 +188,7 @@ def embed_youtube(text):
|
||||
or url.hostname
|
||||
in [
|
||||
"www.youtube.com",
|
||||
"music.youtube.com",
|
||||
"youtube.com",
|
||||
"www.youtube-nocookie.com",
|
||||
"youtube-nocookie.com",
|
||||
@ -338,7 +339,7 @@ def embed_url(text):
|
||||
attachments = {}
|
||||
|
||||
for element in soup.find_all("a"):
|
||||
if "href" in element.attrs and element.attrs["href"].startswith("http"):
|
||||
if "href" in element.attrs and element.attrs["href"].startswith("http") and ("data-noembed" not in element.attrs):
|
||||
page_url = urlparse(element.attrs["href"])
|
||||
page = get_url_content(element.attrs["href"])
|
||||
if page:
|
||||
@ -564,3 +565,4 @@ class PythonExtension(Extension):
|
||||
return "".join(to_write)
|
||||
|
||||
return str(fn(caller()))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user