Skip to content

Commit

Permalink
fix cover
Browse files Browse the repository at this point in the history
  • Loading branch information
malinkang committed Oct 10, 2024
1 parent 5c6c920 commit 4c67663
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/weread.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ def get_chapter_info(bookId):
def insert_to_notion(bookName, bookId, cover, sort, author, isbn, rating, categories):
"""插入到notion"""
time.sleep(0.3)
if not cover or not cover.startswith("http"):
cover = "https://www.notion.so/icons/book_gray.svg"
parent = {"database_id": database_id, "type": "database_id"}
properties = {
"BookName": get_title(bookName),
Expand Down

0 comments on commit 4c67663

Please sign in to comment.