rank_backend/docs/README.md
Qyir 53160420d1 Initial commit: Douyin play count tracking system
Features:
- Douyin play count scraper using Selenium + Chrome DevTools Protocol
- Automated scheduler for daily data collection
- MongoDB data storage
- Mini-program API server
- Data analysis and visualization tools

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 10:48:52 +08:00

51 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 抖音合集数据抓取工具
这是一个用于抓取抖音合集播放数据的Python脚本。
## 功能特点
- 使用Selenium处理动态加载的内容
- 多种数据提取策略页面源码、DOM元素、网络请求
- 反爬虫机制规避
- 错误处理和重试机制
- 数据保存为JSON格式
## 安装依赖
```bash
pip3 install -r requirements.txt
```
## 使用方法
1. 确保已安装Chrome浏览器
2. 运行脚本:
```bash
python3 douyin_scraper.py
```
## 注意事项
1. **法律合规**: 请确保您的使用符合抖音的服务条款和相关法律法规
2. **频率控制**: 避免过于频繁的请求,以免被反爬虫机制阻止
3. **数据使用**: 抓取的数据仅供学习和研究使用,请勿用于商业用途
4. **Chrome驱动**: 脚本会自动管理Chrome驱动但请确保Chrome浏览器已安装
## 可能遇到的问题
1. **ChromeDriver问题**: 如果遇到驱动问题请确保Chrome浏览器版本与ChromeDriver版本匹配
2. **反爬虫限制**: 抖音有较强的反爬虫机制,可能需要调整请求频率或使用代理
3. **页面结构变化**: 抖音页面结构可能会更新,导致数据提取失败,需要相应调整代码
## 输出数据格式
抓取的数据将保存为 `douyin_collection_data.json` 文件,包含:
- 合集标题
- 播放数据
- 视频列表信息
- 统计数据
## 免责声明
本工具仅供学习和研究使用。使用者需要遵守相关法律法规和平台服务条款,作者不承担任何法律责任。