diff --git a/kindle2notion/exporting.py b/kindle2notion/exporting.py index 25bee93..da4e5f9 100644 --- a/kindle2notion/exporting.py +++ b/kindle2notion/exporting.py @@ -4,7 +4,7 @@ import notional from notional.blocks import Paragraph, TextObject from notional.query import TextCondition -from notional.types import Date, ExternalFile, Number, RichText, Title +from notional.types import Date, ExternalFile, Number, RichText, Title, DatabaseRef from requests import get # from notional.text import Annotations @@ -119,7 +119,7 @@ def _add_book_to_notion( # Add a new book to the database if not title_exists: new_page = notion.pages.create( - parent=notion.databases.retrieve(notion_database_id), + parent=DatabaseRef(database_id=notion_database_id), properties={ "Title": Title[title], "Author": RichText[author], diff --git a/requirements.txt b/requirements.txt index 0a6047a..a4b2693 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ click>=8.0.0 -notional>=0.4.1 +notional>=0.5.1 pathlib dateparser>=1.0.0 -requests>=2.25.0 \ No newline at end of file +requests>=2.25.0