Merge pull request #23 from aehernandez/remove-view-select

Remove collection selectors since they don't work anyways
This commit is contained in:
Leonardo Cavaletti 2020-12-30 17:15:09 +01:00 committed by GitHub
commit c49239b7fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -347,6 +347,10 @@ class Parser:
for vendors_css in soup.find_all("link", href=lambda x: x and "vendors~" in x):
vendors_css.decompose()
# collection selectors (List, Gallery, etc.) don't work, so remove them
for collection_selector in soup.findAll("div", {"class": "notion-collection-view-select"}):
collection_selector.decompose()
# clean up the default notion meta tags
for tag in [
"description",