Feature/self host notion import (#397)

This commit is contained in:
Jyong
2023-06-17 19:50:21 +08:00
committed by GitHub
parent 402b0b81d2
commit 226f28edcb
4 changed files with 73 additions and 6 deletions

View File

@@ -84,7 +84,8 @@ class NotionPageReader(BaseReader):
heading = text
result_block_id = result["id"]
has_children = result["has_children"]
if has_children:
block_type = result["type"]
if has_children and block_type != 'child_page':
children_text = self._read_block(
result_block_id, num_tabs=num_tabs + 1
)
@@ -184,7 +185,8 @@ class NotionPageReader(BaseReader):
result_block_id = result["id"]
has_children = result["has_children"]
if has_children:
block_type = result["type"]
if has_children and block_type != 'child_page':
children_text = self._read_block(
result_block_id, num_tabs=num_tabs + 1
)