From c6d67ef0eb1c7de8db4ed6fe3f46aee7fe9b03d3 Mon Sep 17 00:00:00 2001 From: Leonardo Cavaletti Date: Sat, 6 Feb 2021 16:25:28 +0000 Subject: [PATCH] Fixed crash when parsing tags without href --- loconotion/notionparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loconotion/notionparser.py b/loconotion/notionparser.py index 7b06888..6148950 100644 --- a/loconotion/notionparser.py +++ b/loconotion/notionparser.py @@ -566,7 +566,7 @@ class Parser: # find sub-pages and clean slugs / links sub_pages = [] - for a in soup.findAll("a"): + for a in soup.find_all('a', href=True): sub_page_href = a["href"] if sub_page_href.startswith("/"): sub_page_href = "https://www.notion.so" + a["href"]