Fixed crash when parsing <a> tags without href

This commit is contained in:
Leonardo Cavaletti 2021-02-06 16:25:28 +00:00
parent 3f6715a3b4
commit c6d67ef0eb

View File

@ -566,7 +566,7 @@ class Parser:
# find sub-pages and clean slugs / links # find sub-pages and clean slugs / links
sub_pages = [] sub_pages = []
for a in soup.findAll("a"): for a in soup.find_all('a', href=True):
sub_page_href = a["href"] sub_page_href = a["href"]
if sub_page_href.startswith("/"): if sub_page_href.startswith("/"):
sub_page_href = "https://www.notion.so" + a["href"] sub_page_href = "https://www.notion.so" + a["href"]