Conversation
- 将 BROWSER、HEADLESS、VIDEO_LIST_URL 移至 .env 文件 - 添加 python-dotenv 依赖 - 删除 config_example.py,新增 .env.example - 更新 .gitignore:忽略 .env,取消忽略 config.py 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- 推送 v* tag 时自动构建并创建 Release - 支持手动触发,可指定任意版本构建 - 使用 PyInstaller 打包成单文件可执行程序 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- 向 main 分支开 PR 时自动构建 - 构建产物保留 7 天,方便下载测试 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
update README
- 快速开始改为下载 Release + 配置 .env - 开发者使用方式移至后面 - 精简 FAQ 和项目结构说明 - 更新 Cookie 获取文档 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Summary of ChangesHello @YewFence, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求通过引入 Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Caution Review failedThe pull request is closed. Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds environment-based configuration via python-dotenv and a runtime-validated Changes
Sequence Diagram(s)mermaid PR->>GH: push PR (pr-build.yml) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/how_to_get_cookie.md (1)
18-20: Critical: Cookie filename mismatch with config.py.The documentation instructs users to create
browser_cookies.json, butconfig.pyline 21 setsCOOKIE_FILE = "cookies.json". This inconsistency will cause cookie loading to fail.🔎 Proposed fix
Either update config.py to match the documentation:
-COOKIE_FILE = "cookies.json" # Cookie文件路径 +COOKIE_FILE = "browser_cookies.json" # Cookie文件路径Or update the documentation throughout to reference
cookies.jsoninstead ofbrowser_cookies.json.
♻️ Duplicate comments (4)
docs/how_to_get_cookie.md (1)
187-205: Critical: Cookie filename mismatch with config.py.Multiple references to
browser_cookies.jsonin this section are inconsistent withCOOKIE_FILE = "cookies.json"in config.py line 21. Users following these instructions will create a file the application won't find.README.md (2)
25-27: Use absolute URLs for better link reliability.The relative link
../../releasesmay break when viewing the README in certain contexts (local clones, IDEs, etc.).
141-141: Use absolute URLs for better link reliability.The relative link
../../issuesmay break when viewing the README in certain contexts (local clones, IDEs, etc.)..github/workflows/build.yml (1)
43-46: Avoid modifying project files during CI builds.Using
uv add pyinstallermodifies project files during CI execution, creating inconsistency. This is the same issue present inpr-build.yml.Refer to the solution proposed for
.github/workflows/pr-build.ymllines 32-35.
🧹 Nitpick comments (1)
config.py (1)
3-3: Consider fixing fullwidth punctuation for consistency.Static analysis detected fullwidth punctuation marks in comments. While this doesn't affect functionality, using ASCII punctuation provides better consistency with the codebase.
🔎 Proposed fix
""" 配置文件 -敏感配置从 .env 文件读取,其他配置在此文件中设置 +敏感配置从 .env 文件读取,其他配置在此文件中设置 """ # ... -# URL模式匹配(脚本会自动找到所有包含此模式的链接) +# URL模式匹配(脚本会自动找到所有包含此模式的链接) URL_PATTERN = "https://moodle.scnu.edu.cn/mod/fsresource/view.php?id="Also applies to: 24-24
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (9)
.env.example.github/workflows/build.yml.github/workflows/pr-build.yml.gitignoreREADME.mdconfig.pyconfig_example.pydocs/how_to_get_cookie.mdpyproject.toml
💤 Files with no reviewable changes (1)
- config_example.py
🧰 Additional context used
🪛 Ruff (0.14.10)
config.py
3-3: Docstring contains ambiguous , (FULLWIDTH COMMA). Did you mean , (COMMA)?
(RUF002)
16-16: Avoid specifying long messages outside the exception class
(TRY003)
24-24: Comment contains ambiguous ( (FULLWIDTH LEFT PARENTHESIS). Did you mean ( (LEFT PARENTHESIS)?
(RUF003)
24-24: Comment contains ambiguous ) (FULLWIDTH RIGHT PARENTHESIS). Did you mean ) (RIGHT PARENTHESIS)?
(RUF003)
🔇 Additional comments (4)
.gitignore (1)
12-13: LGTM!The updated ignore pattern correctly protects the
.envfile containing sensitive configuration from being committed..env.example (1)
1-8: LGTM!The environment configuration template is clear and well-documented with Chinese comments appropriate for the target audience.
pyproject.toml (1)
8-8: LGTM!The
python-dotenvdependency is correctly added to support environment-based configuration inconfig.py.config.py (1)
15-16: LGTM!The VIDEO_LIST_URL validation properly implements fail-fast behavior, clearly informing users when the required configuration is missing.
| - name: Install dependencies | ||
| run: | | ||
| uv sync | ||
| uv add pyinstaller |
There was a problem hiding this comment.
Avoid modifying project files during CI builds.
Using uv add pyinstaller modifies pyproject.toml and lock files during CI execution, which creates inconsistency between CI and local development environments. These modifications are not committed, leading to non-reproducible builds.
🔎 Recommended solutions
Solution 1 (Recommended): Add PyInstaller as a development dependency in pyproject.toml:
[project.optional-dependencies]
dev = ["pyinstaller>=6.0.0"]Then update the workflow:
- name: Install dependencies
run: |
- uv sync
- uv add pyinstaller
+ uv sync --extra devSolution 2: Use uv pip install to avoid modifying project files:
- name: Install dependencies
run: |
uv sync
- uv add pyinstaller
+ uv pip install pyinstaller📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Install dependencies | |
| run: | | |
| uv sync | |
| uv add pyinstaller | |
| - name: Install dependencies | |
| run: | | |
| uv sync | |
| uv pip install pyinstaller |
🤖 Prompt for AI Agents
.github/workflows/pr-build.yml around lines 32-35: the workflow is running `uv
add pyinstaller` which mutates pyproject.toml and lockfiles during CI; instead
add PyInstaller as a development dependency in pyproject.toml (e.g., under
project.optional-dependencies.dev) and update the workflow step to install
dependencies without modifying project files (e.g., run uv sync/install or use
uv pip install to install without changing manifests); alternatively, if you
prefer not to edit pyproject.toml, replace the `uv add` call with a non-mutating
installer invocation such as `uv pip install pyinstaller` so CI does not alter
repository files.
|
|
||
| # ============= 其他配置 ============= | ||
| # Cookie登录配置 | ||
| COOKIE_FILE = "cookies.json" # Cookie文件路径 |
There was a problem hiding this comment.
Critical: Cookie filename mismatch with documentation.
COOKIE_FILE is set to "cookies.json", but all documentation (README.md, docs/how_to_get_cookie.md) instructs users to create browser_cookies.json. This mismatch will cause cookie loading to fail.
🔎 Proposed fix
Update to match the documentation:
-COOKIE_FILE = "cookies.json" # Cookie文件路径
+COOKIE_FILE = "browser_cookies.json" # Cookie文件路径📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| COOKIE_FILE = "cookies.json" # Cookie文件路径 | |
| COOKIE_FILE = "browser_cookies.json" # Cookie文件路径 |
🤖 Prompt for AI Agents
In config.py around line 21, COOKIE_FILE is set to "cookies.json" which
mismatches documentation that expects "browser_cookies.json"; change the
constant value to "browser_cookies.json" so the runtime cookie loader matches
README/docs/how_to_get_cookie.md and update any related tests or references if
present.
| ### 第二步:创建配置文件 | ||
|
|
||
| #### 方法二:使用 pip | ||
| 在可执行文件同目录下参考 [env.example](./.env.example) 创建 `.env` 文件: |
There was a problem hiding this comment.
Fix the reference to match the actual filename.
The link text shows env.example but should be .env.example to match the actual filename.
🔎 Proposed fix
-在可执行文件同目录下参考 [env.example](./.env.example) 创建 `.env` 文件:
+在可执行文件同目录下参考 [.env.example](./.env.example) 创建 `.env` 文件:📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 在可执行文件同目录下参考 [env.example](./.env.example) 创建 `.env` 文件: | |
| 在可执行文件同目录下参考 [.env.example](./.env.example) 创建 `.env` 文件: |
🤖 Prompt for AI Agents
In README.md around line 31, the link text currently reads "env.example" but the
actual filename is ".env.example"; update the link text to ".env.example" so the
reference matches the real file name (i.e., change the displayed text portion of
the markdown link to ".env.example" while keeping the path ./ .env.example
intact).
#5 Action启动!
CodeRabbit救一下
Summary by CodeRabbit
New Features
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.