Skip to content

Commit 67df772

Browse files
committed
升级
1 parent f3748c7 commit 67df772

File tree

3 files changed

+6
-18
lines changed

3 files changed

+6
-18
lines changed

.github/workflows/weread.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ jobs:
3131
- name: weread sync
3232
run: |
3333
python scripts/weread.py
34-
- name: 写入secrets.txt
35-
run: |
36-
echo "NOTION_TOKEN=${NOTION_TOKEN}" > secrets.txt
37-
echo "NOTION_PAGE=${NOTION_PAGE}" >> secrets.txt
3834
- name: push
3935
run: |
4036
git config --local user.email "[email protected]"

scripts/weread.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
)
3030
load_dotenv()
3131
WEREAD_URL = "https://weread.qq.com/"
32-
WEREAD_NOTEBOOKS_URL = "https://weread.qq.com/user/notebooks"
33-
WEREAD_BOOKMARKLIST_URL = "https://weread.qq.com/book/bookmarklist"
34-
WEREAD_CHAPTER_INFO = "https://weread.qq.com/book/chapterInfos"
35-
WEREAD_READ_INFO_URL = "https://weread.qq.com/book/readinfo"
36-
WEREAD_REVIEW_LIST_URL = "https://weread.qq.com/review/list"
37-
WEREAD_BOOK_INFO = "https://weread.qq.com/book/info"
32+
WEREAD_NOTEBOOKS_URL = "https://weread.qq.com/api/user/notebook"
33+
WEREAD_BOOKMARKLIST_URL = "https://weread.qq.com/web/book/bookmarklist"
34+
WEREAD_CHAPTER_INFO = "https://weread.qq.com/web/book/chapterInfos"
35+
WEREAD_READ_INFO_URL = "https://weread.qq.com/web/book/readinfo"
36+
WEREAD_REVIEW_LIST_URL = "https://weread.qq.com/web/review/list"
37+
WEREAD_BOOK_INFO = "https://weread.qq.com/web/book/info"
3838

3939

4040
def parse_cookie_string(cookie_string):
@@ -423,12 +423,6 @@ def extract_page_id():
423423
book = book.get("book")
424424
title = book.get("title")
425425
cover = book.get("cover").replace("/s_", "/t7_")
426-
# print(cover)
427-
# if book.get("author") == "公众号" and book.get("cover").endswith("/0"):
428-
# cover += ".jpg"
429-
# if cover.startswith("http") and not cover.endswith(".jpg"):
430-
# path = download_image(cover)
431-
# cover = f"https://raw.githubusercontent.com/{os.getenv('REPOSITORY')}/{os.getenv('REF').split('/')[-1]}/{path}"
432426
bookId = book.get("bookId")
433427
author = book.get("author")
434428
categories = book.get("categories")

secrets.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)