diff --git a/loconotion/conditions.py b/loconotion/conditions.py index cf9b2a5..21dc4a3 100644 --- a/loconotion/conditions.py +++ b/loconotion/conditions.py @@ -22,6 +22,7 @@ class notion_page_loaded(object): log.debug( f"Waiting for page content to load" f" (pending blocks: {unknown_blocks}," + f" loading spinners: {loading_spinners}," f" loaded scrollers: {len(scrollers_with_children)} / {len(scrollers)})" ) all_scrollers_loaded = len(scrollers) == len(scrollers_with_children) diff --git a/loconotion/notionparser.py b/loconotion/notionparser.py index ac73c8e..f8d1942 100644 --- a/loconotion/notionparser.py +++ b/loconotion/notionparser.py @@ -234,7 +234,7 @@ class Parser: self.driver.get(url) try: - WebDriverWait(self.driver, 10).until(notion_page_loaded()) + WebDriverWait(self.driver, 60).until(notion_page_loaded()) except TimeoutException as ex: log.critical( "Timeout waiting for page content to load, or no content found." @@ -446,12 +446,11 @@ class Parser: fonts_selectors = { "site": "div:not(.notion-code-block)", "navbar": ".notion-topbar div", - "title": ".notion-page-block > div, .notion-collection_view_page-block > div", - "h1": ".notion-header-block div, notion-page-content >" - " notion-collection_view-block > div:first-child div", + "title": ".notion-page-block > div, .notion-collection_view_page-block > div[data-root]", + "h1": ".notion-header-block div, notion-page-content > notion-collection_view-block > div:first-child div", "h2": ".notion-sub_header-block div", "h3": ".notion-sub_sub_header-block div", - "body": ".notion-app-inner", + "body": ".notion-scroller", "code": ".notion-code-block *", } custom_fonts = self.get_page_config(url).get("fonts", {})