Skip to content

Commit 4c67663

Browse files
committed
fix cover
1 parent 5c6c920 commit 4c67663

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/weread.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ def get_chapter_info(bookId):
125125
def insert_to_notion(bookName, bookId, cover, sort, author, isbn, rating, categories):
126126
"""插入到notion"""
127127
time.sleep(0.3)
128+
if not cover or not cover.startswith("http"):
129+
cover = "https://www.notion.so/icons/book_gray.svg"
128130
parent = {"database_id": database_id, "type": "database_id"}
129131
properties = {
130132
"BookName": get_title(bookName),

0 commit comments

Comments
 (0)