Force html5lib for parsing OG data

This commit is contained in:
Thomas Sileo 2019-08-04 10:29:50 +02:00
parent df4199eb86
commit 1062f26970

View file

@ -23,7 +23,7 @@ def links_from_note(note):
links = set() links = set()
if "content" in note: if "content" in note:
soup = BeautifulSoup(note["content"]) soup = BeautifulSoup(note["content"], "html5lib")
for link in soup.find_all("a"): for link in soup.find_all("a"):
h = link.get("href") h = link.get("href")
if h.startswith("http") and h not in tags_href and is_url_valid(h): if h.startswith("http") and h not in tags_href and is_url_valid(h):