Update .gitignore and add Chrome profile setup documentation
- 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 <noreply@anthropic.com>
This commit is contained in:
parent
53160420d1
commit
bdbe2cb555
3
.gitignore
vendored
3
.gitignore
vendored
@ -31,8 +31,9 @@ douyin_cdp_play_vv_*.json
|
|||||||
douyin_cdp_play_vv_*.txt
|
douyin_cdp_play_vv_*.txt
|
||||||
|
|
||||||
# Chrome profiles and drivers
|
# Chrome profiles and drivers
|
||||||
|
# 注意:Chrome profile 包含大量缓存文件,不应加入Git
|
||||||
|
scripts/config/chrome_profile/
|
||||||
drivers/
|
drivers/
|
||||||
config/
|
|
||||||
|
|
||||||
# Environment variables
|
# Environment variables
|
||||||
.env
|
.env
|
||||||
|
|||||||
37
CHROME_PROFILE_SETUP.md
Normal file
37
CHROME_PROFILE_SETUP.md
Normal file
@ -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 仓库中,无需额外设置。
|
||||||
Loading…
x
Reference in New Issue
Block a user