From bdbe2cb55580bc9615f09891480a1a5ccc1f3a9a Mon Sep 17 00:00:00 2001 From: Qyir <13521889462@163.com> Date: Fri, 17 Oct 2025 10:57:20 +0800 Subject: [PATCH] Update .gitignore and add Chrome profile setup documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Exclude Chrome profile directory from Git due to large cache files - Add CHROME_PROFILE_SETUP.md with manual setup instructions - Chrome profile contains sensitive login data and should not be version controlled 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .gitignore | 3 ++- CHROME_PROFILE_SETUP.md | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 CHROME_PROFILE_SETUP.md diff --git a/.gitignore b/.gitignore index ebb1f33..8565663 100644 --- a/.gitignore +++ b/.gitignore @@ -31,8 +31,9 @@ douyin_cdp_play_vv_*.json douyin_cdp_play_vv_*.txt # Chrome profiles and drivers +# 注意:Chrome profile 包含大量缓存文件,不应加入Git +scripts/config/chrome_profile/ drivers/ -config/ # Environment variables .env diff --git a/CHROME_PROFILE_SETUP.md b/CHROME_PROFILE_SETUP.md new file mode 100644 index 0000000..9d4ab92 --- /dev/null +++ b/CHROME_PROFILE_SETUP.md @@ -0,0 +1,37 @@ +# Chrome Profile Setup Guide + +## 重要说明 + +Chrome 配置文件 (`scripts/config/chrome_profile/douyin_persistent`) 包含大量缓存文件和个人登录信息,这些文件不应该加入 Git 版本控制。 + +## 手动设置步骤 + +1. **创建 Chrome 配置文件目录** + ```bash + mkdir -p scripts/config/chrome_profile/douyin_persistent + ``` + +2. **手动登录抖音** + - 运行 `scripts/douyin_selenium_cdp_play_vv.py` 脚本 + - 首次运行时会自动创建 Chrome 配置文件 + - 在浏览器中手动登录抖音账号 + - 登录成功后关闭浏览器 + +3. **验证登录状态** + - 重新运行脚本 + - 如果能够正常获取数据,说明登录状态已保存 + +## 为什么 Chrome 配置文件不加入 Git + +- **文件大小**: Chrome 配置文件包含大量缓存文件,总大小可能超过 100MB +- **个人隐私**: 包含登录凭据、Cookie 等敏感信息 +- **平台差异**: 不同操作系统上的 Chrome 配置文件不兼容 +- **动态变化**: 缓存文件会频繁变化,不适合版本控制 + +## 故障排除 + +如果登录状态丢失,请重新执行手动登录步骤。 + +## 驱动程序 + +ChromeDriver (`drivers/chromedriver.exe`) 已包含在 Git 仓库中,无需额外设置。 \ No newline at end of file