From 1062f269702b044041aac0d047ff7534fc2159ff Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 4 Aug 2019 10:29:50 +0200 Subject: [PATCH] Force html5lib for parsing OG data --- utils/opengraph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/opengraph.py b/utils/opengraph.py index d96bd28..2f47304 100644 --- a/utils/opengraph.py +++ b/utils/opengraph.py @@ -23,7 +23,7 @@ def links_from_note(note): links = set() if "content" in note: - soup = BeautifulSoup(note["content"]) + soup = BeautifulSoup(note["content"], "html5lib") for link in soup.find_all("a"): h = link.get("href") if h.startswith("http") and h not in tags_href and is_url_valid(h):