get-class-material 1.0.2__tar.gz → 1.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {get_class_material-1.0.2 → get_class_material-1.0.4}/PKG-INFO +96 -33
  2. {get_class_material-1.0.2 → get_class_material-1.0.4}/README.md +95 -32
  3. {get_class_material-1.0.2 → get_class_material-1.0.4}/get_class_material.egg-info/PKG-INFO +96 -33
  4. {get_class_material-1.0.2 → get_class_material-1.0.4}/get_class_material.egg-info/entry_points.txt +1 -0
  5. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/browser_session.py +31 -3
  6. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/cli.py +15 -8
  7. get_class_material-1.0.4/ntu_cool_materials/console.py +65 -0
  8. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/course_pipeline.py +9 -4
  9. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/doctor.py +19 -11
  10. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/notebooklm_api.py +3 -1
  11. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/spreadsheet_convert.py +2 -1
  12. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/update_check.py +98 -7
  13. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/youtube_cookies.py +3 -1
  14. {get_class_material-1.0.2 → get_class_material-1.0.4}/pyproject.toml +2 -1
  15. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_browser_session.py +27 -0
  16. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_cli.py +2 -1
  17. get_class_material-1.0.4/tests/test_console.py +65 -0
  18. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_download_reliability.py +2 -0
  19. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_update_check.py +47 -0
  20. get_class_material-1.0.2/ntu_cool_materials/console.py +0 -27
  21. get_class_material-1.0.2/tests/test_console.py +0 -22
  22. {get_class_material-1.0.2 → get_class_material-1.0.4}/LICENSE +0 -0
  23. {get_class_material-1.0.2 → get_class_material-1.0.4}/get_class_material.egg-info/SOURCES.txt +0 -0
  24. {get_class_material-1.0.2 → get_class_material-1.0.4}/get_class_material.egg-info/dependency_links.txt +0 -0
  25. {get_class_material-1.0.2 → get_class_material-1.0.4}/get_class_material.egg-info/requires.txt +0 -0
  26. {get_class_material-1.0.2 → get_class_material-1.0.4}/get_class_material.egg-info/top_level.txt +0 -0
  27. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/__init__.py +0 -0
  28. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/__main__.py +0 -0
  29. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/announcements.py +0 -0
  30. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/canvas_client.py +0 -0
  31. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/cool_video.py +0 -0
  32. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/http_io.py +0 -0
  33. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/i18n.py +0 -0
  34. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/media_naming.py +0 -0
  35. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/notebooklm.py +0 -0
  36. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/notebooklm_flow.py +0 -0
  37. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/pages.py +0 -0
  38. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/session_client.py +0 -0
  39. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/spinner.py +0 -0
  40. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/storage.py +0 -0
  41. {get_class_material-1.0.2 → get_class_material-1.0.4}/ntu_cool_materials/sync.py +0 -0
  42. {get_class_material-1.0.2 → get_class_material-1.0.4}/setup.cfg +0 -0
  43. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_announcements.py +0 -0
  44. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_canvas_client.py +0 -0
  45. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_cool_video.py +0 -0
  46. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_course_pipeline.py +0 -0
  47. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_doctor.py +0 -0
  48. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_excel_download_import.py +0 -0
  49. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_media_naming.py +0 -0
  50. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_notebooklm.py +0 -0
  51. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_notebooklm_api.py +0 -0
  52. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_notebooklm_flow.py +0 -0
  53. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_session_client.py +0 -0
  54. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_spinner.py +0 -0
  55. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_spreadsheet_convert.py +0 -0
  56. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_storage.py +0 -0
  57. {get_class_material-1.0.2 → get_class_material-1.0.4}/tests/test_youtube_cookies.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: get-class-material
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: One-command bulk downloader for NTU COOL (Canvas) course materials — PDFs, lecture videos, and Pages.
5
5
  Author-email: jabir <jabir95tsai@gmail.com>
6
6
  License-Expression: MIT
@@ -51,14 +51,28 @@ Dynamic: license-file
51
51
 
52
52
  ```powershell
53
53
  python -m pip install get-class-material
54
- ntu-cool-gcm
54
+ get-class-material
55
55
  ```
56
+
57
+ > 舊指令 `ntu-cool-gcm` 仍可使用,功能完全相同。 / The old `ntu-cool-gcm` command still works.
58
+
59
+ > 出現「應用程式控制原則已封鎖此檔案」? 改用 `python -X utf8 -m ntu_cool_materials pick`,詳見[這題](#q-顯示應用程式控制原則已封鎖此檔案winerror-4551)。 / Blocked by Windows Application Control? Run `python -X utf8 -m ntu_cool_materials pick` instead.
60
+
56
61
  更新到最新版,輸入:
57
62
 
58
63
  ```powershell
59
64
  python -m pip install --upgrade get-class-material
60
65
  ```
61
66
 
67
+ 🍎 **Mac:** 打開「終端機」(Terminal),指令裡的 `python` 改成 `python3`:
68
+
69
+ ```bash
70
+ python3 -m pip install get-class-material
71
+ get-class-material
72
+ ```
73
+
74
+ Mac 內建的 Python 是 3.9,太舊;請先照 [Mac 使用者](#-mac-使用者) 裝新版 Python。
75
+
62
76
  ## 📦 會下載什麼
63
77
 
64
78
  | 類型 | 內容 | 存成 |
@@ -74,7 +88,7 @@ python -m pip install --upgrade get-class-material
74
88
 
75
89
  ## 📚 目錄
76
90
 
77
- - [新手完整教學](#新手完整教學)
91
+ - [新手完整教學](#新手完整教學) · [Mac 使用者](#-mac-使用者)
78
92
  - [你會拿到什麼](#你會拿到什麼) · [下載後怎麼給 AI 用](#下載後怎麼給-ai-用)
79
93
  - [常見任務](#常見任務)
80
94
  - [自動匯入個人版 NotebookLM](#自動匯入個人版-notebooklm實驗功能)
@@ -84,6 +98,43 @@ python -m pip install --upgrade get-class-material
84
98
 
85
99
  ## 新手完整教學
86
100
 
101
+ > 下面的步驟以 Windows 為例。**Mac 使用者請看 [這一段](#-mac-使用者)**,做完再回來看第 5 步的登入說明和之後的選課步驟。
102
+
103
+ ### 🍎 Mac 使用者
104
+
105
+ 整個流程跟 Windows 一樣,差別只有這幾點:
106
+
107
+ 1. **用「終端機」取代 PowerShell。** 按 `⌘ + 空白鍵` 打開 Spotlight,輸入 `終端機`(或 `Terminal`),按 Enter。
108
+ 2. **指令裡的 `python` 一律改成 `python3`。** Mac 沒有 `python` 這個指令。
109
+ 3. **安裝新版 Python。** macOS 內建的是 Python 3.9,不能用。到 <https://www.python.org/downloads/macos/> 下載 macOS 安裝檔(`.pkg`),一路按「繼續」裝完,然後**關掉終端機重開**。確認:
110
+
111
+ ```bash
112
+ python3 --version
113
+ ```
114
+
115
+ 要看到 `Python 3.11` 以上。
116
+
117
+ 4. **安裝工具並執行:**
118
+
119
+ ```bash
120
+ python3 -m pip install get-class-material
121
+ get-class-material
122
+ ```
123
+
124
+ 如果顯示 `command not found: get-class-material`,先跑一次 `python3 -m ntu_cool_materials doctor --fix`,它會把路徑加進 `~/.zprofile`;關掉終端機重開就能用。
125
+
126
+ 5. **ffmpeg / Node.js(YouTube 影片才需要)用 Homebrew 安裝。** 沒有 Homebrew 的話,先到 <https://brew.sh> 複製那行安裝指令貼到終端機執行,然後:
127
+
128
+ ```bash
129
+ brew install ffmpeg node
130
+ ```
131
+
132
+ 之後 `ntu-cool-gcm` 也可以自動幫你跑這行。
133
+
134
+ 6. **YouTube 私人影片用 Safari 登入的話**:工具會問要不要讀瀏覽器的登入狀態。Chrome / Edge / Firefox 直接可用;Safari 需要到「系統設定 → 隱私權與安全性 → 完整磁碟取用權限」把「終端機」打開,否則會讀不到。
135
+
136
+ > 用 Homebrew 裝的 Python(`brew install python`)跑 `pip install` 會顯示 `externally-managed-environment`。改用 `pipx install get-class-material`(先 `brew install pipx`),或直接用 python.org 的安裝檔。
137
+
87
138
  ### 第 1 步 — 確認你有沒有 Python
88
139
 
89
140
  **Python** 是這個工具運作所需的程式語言環境。
@@ -137,14 +188,16 @@ python -m pip install get-class-material
137
188
  ### 第 5 步 — 第一次跑工具
138
189
 
139
190
  ```powershell
140
- ntu-cool-gcm
191
+ get-class-material
141
192
  ```
142
193
 
194
+ > 出現「應用程式控制原則已封鎖此檔案」? 改用 `python -X utf8 -m ntu_cool_materials pick`,詳見[這題](#q-顯示應用程式控制原則已封鎖此檔案winerror-4551)。 / Blocked by Windows Application Control? Run `python -X utf8 -m ntu_cool_materials pick` instead.
195
+
143
196
  第一次跑會花幾分鐘,因為它會幫你裝幾個額外的東西:
144
197
 
145
198
  - **Chromium 瀏覽器**(讓工具能幫你登入,大約 200MB)
146
- - **ffmpeg**(合併 YouTube 影片用,大約 240MB,Windows 用 `winget` 安裝)
147
- - **Node.js**(處理 YouTube 影片用,Windows 用 `winget` 安裝)
199
+ - **ffmpeg**(合併 YouTube 影片用,大約 240MB,Windows 用 `winget`、Mac 用 Homebrew 安裝)
200
+ - **Node.js**(處理 YouTube 影片用,Windows 用 `winget`、Mac 用 Homebrew 安裝)
148
201
 
149
202
  ffmpeg 和 Node.js 只有下載 YouTube 影片才需要,所以工具會先問你 `要現在自動安裝嗎? [Y/n]`,直接按 Enter 就是安裝。選 `n` 的話 30 天內不會再問,PDF / Page / 上課影片照常下載;之後想裝隨時可以跑 `ntu-cool-materials doctor --fix`。
150
203
 
@@ -262,7 +315,7 @@ C:\Users\你\Documents\ntu-cool-gcm_material\
262
315
  - **`announcements/announcements.md`** — 課程公告全文,每次執行都會更新
263
316
  - **`course_overview.md`** — 整門課的目錄索引,列出每週有什麼、檔案放在哪。**直接拖到 AI 就可以叫它幫你做學習計畫**
264
317
 
265
- 資料夾裡以 `.` 開頭的檔案(`.ntu_cool_materials.sqlite3`、`.media-cache` 等)是工具的紀錄,在 Windows 上會自動隱藏,不要刪除。
318
+ 資料夾裡以 `.` 開頭的檔案(`.ntu_cool_materials.sqlite3`、`.media-cache` 等)是工具的紀錄,在 Windows 上會自動隱藏(Mac 的 Finder 本來就不顯示 `.` 開頭的檔案),不要刪除。
266
319
 
267
320
  ---
268
321
 
@@ -292,18 +345,18 @@ C:\Users\你\Documents\ntu-cool-gcm_material\
292
345
 
293
346
  ### 登入過期了
294
347
 
295
- **多數情況你不用做任何事** — 直接跑 `ntu-cool-gcm`,工具會在連線時自動發現登入過期,並馬上幫你開瀏覽器重新登入(你會看到「登入已過期,開啟瀏覽器重新登入…」)。
348
+ **多數情況你不用做任何事** — 直接跑 `get-class-material`,工具會在連線時自動發現登入過期,並馬上幫你開瀏覽器重新登入(你會看到「登入已過期,開啟瀏覽器重新登入…」)。
296
349
 
297
350
  如果想手動強制重新登入,也可以加:
298
351
 
299
352
  ```powershell
300
- ntu-cool-gcm --refresh-session
353
+ get-class-material --refresh-session
301
354
  ```
302
355
 
303
356
  ### 只想下載 PDF,不要影片
304
357
 
305
358
  ```powershell
306
- ntu-cool-gcm --skip-youtube --skip-cool-videos
359
+ get-class-material --skip-youtube --skip-cool-videos
307
360
  ```
308
361
 
309
362
  下載課程時預設一併抓取所有可見公告(標題、作者、日期與全文),存放於課程資料夾的 `announcements/announcements.md` 與 `announcements/.announcements.json`(隱藏檔)。每次執行會重新抓取,以更新老師修改過的公告;課程總覽亦提供公告連結。可用 `--skip-announcements` 略過。
@@ -313,7 +366,7 @@ ntu-cool-gcm --skip-youtube --skip-cool-videos
313
366
  ### 換存檔位置
314
367
 
315
368
  ```powershell
316
- ntu-cool-gcm --out D:\我的課程
369
+ get-class-material --out D:\我的課程
317
370
  ```
318
371
 
319
372
  預設是在你的「文件 / Documents」資料夾底下的 `ntu-cool-gcm_material/`。
@@ -337,7 +390,7 @@ ntu-cool-gcm --out D:\我的課程
337
390
 
338
391
  ```powershell
339
392
  # 額外檢查本機內容雜湊 / Verify local SHA-256 before skipping
340
- ntu-cool-gcm --verify-files
393
+ get-class-material --verify-files
341
394
 
342
395
  # 限制並行數 / Limit simultaneous file transfers
343
396
  ntu-cool-materials download-course --course-id 57544 --workers 2
@@ -370,7 +423,7 @@ ntu-cool-materials doctor --fix
370
423
  ### 看自己是哪個版本(回報問題時很有用)
371
424
 
372
425
  ```powershell
373
- ntu-cool-gcm --version
426
+ get-class-material --version
374
427
  ```
375
428
 
376
429
  `doctor` 的最上面也會印出版本號。回報問題時附上版本,會比較好幫你查。
@@ -381,7 +434,7 @@ ntu-cool-gcm --version
381
434
  💡 有新版本 1.0.1(你目前 1.0.0)。更新指令: python -m pip install --upgrade get-class-material
382
435
  ```
383
436
 
384
- 照著跑那行 `python -m pip install --upgrade get-class-material` 就更新好了。
437
+ 照著跑那行 `python -m pip install --upgrade get-class-material` 就更新好了(Mac 上提示會直接顯示成 `python3`)。
385
438
 
386
439
  ### YouTube 不公開影片下載失敗
387
440
 
@@ -395,13 +448,15 @@ ntu-cool-gcm --version
395
448
  要用你瀏覽器裡已登入的 YouTube 帳號重試嗎? [y/N]
396
449
  ```
397
450
 
398
- 按 `y`,工具就會**直接讀取你平常用的瀏覽器(Chrome / Edge / Firefox …)裡已經登入的 YouTube 帳號**來重試——你不用再登入一次。
451
+ 按 `y`,工具就會**直接讀取你平常用的瀏覽器(Chrome / Edge / Firefox / Brave …;Mac 上還會試 Vivaldi / Opera / Chromium / Safari)裡已經登入的 YouTube 帳號**來重試——你不用再登入一次。
399
452
 
400
453
  > 💡 **為什麼是讀瀏覽器、不是跳出來登入?**
401
454
  > Google 會擋「被程式控制的瀏覽器」登入(會顯示「這個瀏覽器可能不安全」),所以直接讀你平常瀏覽器裡的登入狀態最穩。
402
455
  >
403
456
  > ⚠ 如果你用 **Chrome / Edge**,重試前請**先完全關掉那個瀏覽器**——瀏覽器開著的時候 cookie 檔會被鎖住,讀不到。Firefox 通常不用關。
404
457
  >
458
+ > 🍎 Mac 用 **Safari** 的話,要先到「系統設定 → 隱私權與安全性 → 完整磁碟取用權限」把「終端機」打開,否則讀不到 Safari 的 cookie。
459
+ >
405
460
  > 前提是你平常那個瀏覽器**有登入會看到這些影片的 Google 帳號**(通常就是你的台大 Google 或個人帳號)。
406
461
 
407
462
  有些 NTU 上課影片(cool-video)其實是包著 YouTube 影片;如果它是私人影片,也會用同樣的方式重試。前面已經回答過 `y` 的話不會再問一次。
@@ -417,9 +472,11 @@ ntu-cool-gcm --version
417
472
  ```powershell
418
473
  python -m pip install "get-class-material[notebooklm]"
419
474
  notebooklm login # 第一次:在跳出的 Chrome 視窗登入 Google
420
- ntu-cool-gcm --notebooklm # 選課、下載,完成後直接匯入
475
+ get-class-material --notebooklm # 選課、下載,完成後直接匯入
421
476
  ```
422
477
 
478
+ 🍎 Mac:`python` 改成 `python3`。Google 可能擋自動化瀏覽器登入,有裝 Google Chrome 的話改跑 `notebooklm login --browser chrome`(匯入時登入過期,工具自己重開登入也會自動用 Chrome)。
479
+
423
480
  已經下載過的課程,執行 `ntu-cool-materials notebooklm` 就能從清單選課匯入。
424
481
 
425
482
  <details>
@@ -437,9 +494,9 @@ ntu-cool-materials notebooklm
437
494
 
438
495
  登入狀態由 `notebooklm-py` 保存在本機。可用 `NOTEBOOKLM_HOME` 或 `--notebooklm-storage` 指定。不要提交或分享登入檔案。程式不會從日常 Chrome 擷取 Cookie;登入失效時請重新執行登入程式。
439
496
 
440
- 舊版的擴充套件(`--extension`)、自動化瀏覽器(`--browser`)與手動上傳資料夾(`--manual`)已移除。沒有安裝 `notebooklm-py` 時,`ntu-cool-gcm` 下載完成後不會詢問匯入,只會提示一次安裝指令;明確加 `--notebooklm` 則會顯示安裝方式並回傳失敗。
497
+ 舊版的擴充套件(`--extension`)、自動化瀏覽器(`--browser`)與手動上傳資料夾(`--manual`)已移除。沒有安裝 `notebooklm-py` 時,`get-class-material` 下載完成後不會詢問匯入,只會提示一次安裝指令;明確加 `--notebooklm` 則會顯示安裝方式並回傳失敗。
441
498
 
442
- 成功使用本機 API 登入後,會將登入檔的絕對路徑記錄在 `~/.ntu-cool-gcm/notebooklm-storage.json`(只記錄位置,不複製憑證),之後從其他目錄啟動 `gcm` 也能沿用。明確指定的登入參數及目前目錄的登入設定仍優先;刪除這個位置紀錄即可取消跨目錄沿用。
499
+ 成功使用本機 API 登入後,會將登入檔的絕對路徑記錄在 `~/.ntu-cool-gcm/notebooklm-storage.json`(只記錄位置,不複製憑證),之後從其他目錄啟動 `get-class-material` 也能沿用。明確指定的登入參數及目前目錄的登入設定仍優先;刪除這個位置紀錄即可取消跨目錄沿用。
443
500
 
444
501
  ### CLI 指定課程流程
445
502
 
@@ -460,17 +517,17 @@ ntu-cool-materials notebooklm --course-id 60804 --verify-only
460
517
 
461
518
  ### 互動選課流程
462
519
 
463
- 1. 執行 `ntu-cool-gcm`,用自己的台大帳號登入、選課下載。
520
+ 1. 執行 `get-class-material`,用自己的台大帳號登入、選課下載。
464
521
  2. 下載完成後回答「要將這門課匯入 NotebookLM 嗎?」;預設否,下載不會自動把教材送到 Google。
465
522
  3. 回答 `y` 就直接開始 API 匯入:沿用此課程已記錄的筆記本,首次則以課程名稱自動建立。不再選筆記本或二次確認。
466
523
  4. 終端機顯示匯入結果與筆記本連結。缺少或過期的登入會提示重新登入;上傳失敗時教材仍會保留。
467
524
 
468
- 一般 `gcm` 指令也會沿用目前目錄 `.secrets`(不存在時使用家目錄 `.ntu-cool-gcm/.secrets`)內的 `notebooklm-api` API 登入。明確指定 `--notebooklm-storage` 或 SDK 的 `NOTEBOOKLM_HOME`/`NOTEBOOKLM_PROFILE`/`NOTEBOOKLM_AUTH_JSON` 時,以指定設定為準。若都沒有本機登入則使用 SDK 的預設設定檔。API 功能需在執行 `gcm` 的同一 Python 環境安裝 `get-class-material[notebooklm]`。
525
+ 一般 `get-class-material` 指令也會沿用目前目錄 `.secrets`(不存在時使用家目錄 `.ntu-cool-gcm/.secrets`)內的 `notebooklm-api` API 登入。明確指定 `--notebooklm-storage` 或 SDK 的 `NOTEBOOKLM_HOME`/`NOTEBOOKLM_PROFILE`/`NOTEBOOKLM_AUTH_JSON` 時,以指定設定為準。若都沒有本機登入則使用 SDK 的預設設定檔。API 功能需在執行 `get-class-material` 的同一 Python 環境安裝 `get-class-material[notebooklm]`。
469
526
 
470
527
  已有教材的使用者只要執行 `ntu-cool-materials notebooklm`,就能從預設下載目錄選課,
471
528
  也可輸入其他資料夾路徑。每位使用者使用自己的帳號與本機設定檔,不需要維護者的 Google 帳號、API key 或 Codex。
472
529
  `--no-notebooklm` 可略過下載後的詢問;管線/非互動模式不會自動詢問。
473
- 匯入訊息預設是中文,`notebooklm`、`download-course`、`ntu-cool-gcm` 都可加 `--lang en` 改成英文。
530
+ 匯入訊息預設是中文,`notebooklm`、`download-course`、`get-class-material` 都可加 `--lang en` 改成英文。
474
531
 
475
532
  ```powershell
476
533
  # 開啟既有教材匯入引導 / Guided course picker
@@ -480,7 +537,7 @@ ntu-cool-materials notebooklm
480
537
  ntu-cool-materials notebooklm --course-dir "C:\教材\課程名稱 (60804)" --guide
481
538
 
482
539
  # 選課、下載後,自動匯入 NotebookLM / Download, then import
483
- ntu-cool-gcm --notebooklm
540
+ get-class-material --notebooklm
484
541
 
485
542
  # 指定單一課程 / One course
486
543
  ntu-cool-materials download-course --course-id 60804 --notebooklm
@@ -551,7 +608,7 @@ API 模式使用**非官方 Google 個人版介面**,不是 Enterprise 官方
551
608
  python -m pip install --upgrade get-class-material
552
609
  ```
553
610
 
554
- 已經是最新版的話它不會做任何事,隨時都可以放心跑。想確認自己現在哪一版,打 `ntu-cool-gcm --version`。
611
+ 已經是最新版的話它不會做任何事,隨時都可以放心跑。想確認自己現在哪一版,打 `get-class-material --version`。
555
612
 
556
613
  ### Q: 輸入 `python --version` 顯示「無法辨識」/「找不到」
557
614
 
@@ -565,12 +622,14 @@ python -m pip install --upgrade get-class-material
565
622
 
566
623
  ### Q: 顯示「應用程式控制原則已封鎖此檔案」(WinError 4551)
567
624
 
568
- Windows 的 Smart App Control / 應用程式控制原則擋下了未簽章的執行檔(例如 `pip.exe`、`ntu-cool-gcm.exe`)。所以本文件一律用 `python -m pip` 安裝與更新;如果連 `ntu-cool-gcm` 也被擋,改用:
625
+ Windows 的 Smart App Control / 應用程式控制原則擋下了未簽章的執行檔(例如 `pip.exe`、`get-class-material.exe`)。所以本文件一律用 `python -m pip` 安裝與更新;如果連 `get-class-material` 也被擋,改用:
569
626
 
570
627
  ```powershell
571
628
  python -X utf8 -m ntu_cool_materials pick
572
629
  ```
573
630
 
631
+ 若是登入用的 Chromium 瀏覽器被擋,程式會自動改用電腦上安裝的 Google Chrome(有 Google 簽章,不會被擋);沒有 Chrome 的話請先[安裝](https://www.google.com/chrome/)。第一次改用 Chrome 需要重新登入一次。
632
+
574
633
  若是 `ffmpeg.exe` 或 `node.exe` 被擋,程式會提示並跳過 YouTube 階段(或畫質受限),其餘檔案照常下載;要完整功能需請電腦管理員放行該檔案。請不要為此關閉 Smart App Control(關掉後無法再開回來)。
575
634
 
576
635
  ### Q: PowerShell 顯示「無法載入指令碼,因為這個系統上已停用指令碼執行」
@@ -583,7 +642,7 @@ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
583
642
 
584
643
  按 `Y` 確認。然後關掉視窗,正常開一個新的就 OK。
585
644
 
586
- ### Q: `ntu-cool-gcm` 跑下去說 `winget` 找不到
645
+ ### Q: `get-class-material` 跑下去說 `winget` 找不到
587
646
 
588
647
  `winget` 是 Windows 11 內建的應用程式安裝工具。Windows 10 比較舊版可能沒有。
589
648
 
@@ -593,14 +652,18 @@ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
593
652
  1. ffmpeg: <https://www.gyan.dev/ffmpeg/builds/>(下載 `ffmpeg-release-essentials.zip`)
594
653
  2. Node.js: <https://nodejs.org/>(下載 LTS 版)
595
654
 
596
- 裝完關掉 PowerShell 重開,再跑 `ntu-cool-gcm`。
655
+ 裝完關掉 PowerShell 重開,再跑 `get-class-material`。
656
+
657
+ ### Q: Mac 上出現 `CERTIFICATE_VERIFY_FAILED`
658
+
659
+ python.org 的 Mac 版 Python 預設沒有 SSL 憑證。工具會自動改用 `certifi` 的憑證,一般不會遇到;如果其他程式也出現這個錯誤,打開「應用程式 → Python 3.x」資料夾,點兩下 **Install Certificates.command** 即可。
597
660
 
598
661
  ### Q: NTU COOL 登入過期了
599
662
 
600
- 直接再跑一次 `ntu-cool-gcm` 就好 — 工具會自動發現過期並開瀏覽器讓你重新登入。要手動強制的話可以加 `--refresh-session`:
663
+ 直接再跑一次 `get-class-material` 就好 — 工具會自動發現過期並開瀏覽器讓你重新登入。要手動強制的話可以加 `--refresh-session`:
601
664
 
602
665
  ```powershell
603
- ntu-cool-gcm --refresh-session
666
+ get-class-material --refresh-session
604
667
  ```
605
668
 
606
669
  ### Q: YouTube 影片抓不到 / 失敗很多
@@ -615,7 +678,7 @@ ntu-cool-gcm --refresh-session
615
678
 
616
679
  ### Q: 下載到一半中斷怎麼辦
617
680
 
618
- **直接再跑一次 `ntu-cool-gcm`** 即可。
681
+ **直接再跑一次 `get-class-material`** 即可。
619
682
 
620
683
  - 已記錄完成且版本/本機大小吻合的檔案會跳過。
621
684
  - 伺服器支援 Range,且部分檔案具有吻合的 ETag/Last-Modified 時才續傳;無法確認版本時會安全地重新下載。
@@ -641,7 +704,7 @@ C:\Users\你\Documents\ntu-cool-gcm_material\
641
704
  可以:
642
705
 
643
706
  ```powershell
644
- ntu-cool-gcm --skip-pages --skip-youtube --skip-cool-videos
707
+ get-class-material --skip-pages --skip-youtube --skip-cool-videos
645
708
  ```
646
709
 
647
710
  ### Q: 可以換輸出資料夾嗎
@@ -649,7 +712,7 @@ ntu-cool-gcm --skip-pages --skip-youtube --skip-cool-videos
649
712
  可以:
650
713
 
651
714
  ```powershell
652
- ntu-cool-gcm --out D:\我的課程資料夾
715
+ get-class-material --out D:\我的課程資料夾
653
716
  ```
654
717
 
655
718
  ### Q: 影片畫質好像不太好
@@ -692,7 +755,7 @@ NTU 上課影片(cool-video)畫質維持來源原檔。
692
755
  - ❌ **不要**分享給別人,連同學也不要
693
756
  - ❌ **不要**上傳到 GitHub、雲端硬碟、Discord
694
757
  - ❌ **不要**截圖貼到聊天室
695
- - ✅ 換電腦就重新跑 `ntu-cool-gcm --refresh-session` 重新登入即可
758
+ - ✅ 換電腦就重新跑 `get-class-material --refresh-session` 重新登入即可
696
759
 
697
760
  預設它是隱藏資料夾(Windows 用 `dir` 看不到,要在檔案總管開「顯示隱藏檔」才看得到)。
698
761
 
@@ -720,7 +783,7 @@ ntu-cool-materials announcements --course-id 57544 --refresh-session --print
720
783
 
721
784
  ```powershell
722
785
  ntu-cool-materials --help
723
- ntu-cool-gcm --help
786
+ get-class-material --help
724
787
  ```
725
788
 
726
789
  ---