豆瓣技巧
- 作者仓库星标 0
- 作者更新于 2026年8月24日 07:33
- 作者仓库 claude-code-skills
- 领域
- 通用
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @daymade · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 需要 · Vendor-specific
- 兼容的系统
- macOS · Linux · Windows
- 运行环境要求
- Node.js · Python >=3.6
- 检测到的文件与系统行为
-
- 只读
- 读取环境变量
- 网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
Downloads/douban-sync/<user_id>/
├── 书.csv (读过 + 在读 + 想读)
├── 影视.csv (看过 + 在看 + 想看)
├── 音乐.csv (听过 + 在听 + 想听)
└── 游戏.csv (玩过 + 在玩 + 想玩)
# Douban Collection Export
Export Douban user collections (books, movies, music, games) to CSV files.
Douban has no official data export; the official API shut down in 2018.
## What This Skill Can Do
- Full export of all book/movie/music/game collections via Frodo API
- RSS incremental sync for daily updates (last ~10 items)
- CSV output with UTF-8 BOM (Excel-compatible), cross-platform (macOS/Windows/Linux)
- No login, no cookies, no browser required
- Pre-flight user ID validation (fail fast on wrong ID)
## What This Skill Cannot Do
- Cannot export reviews (长评), notes (读书笔记), or broadcasts (广播)
- Cannot filter by single category in one run (exports all 4 types together)
- Cannot access private profiles (returns 0 items silently)
## Why Frodo API (Do NOT Use Web Scraping)
Douban uses PoW (Proof of Work) challenges on web pages, blocking all HTTP scraping.
We tested 7 approaches — only the Frodo API works. **Do NOT attempt** web scraping,
`browser_cookie3`+`requests`, `curl` with cookies, or Jina Reader.
See [references/troubleshooting.md](references/troubleshooting.md) for the complete
failure log of all 7 tested approaches and why each failed.
## Security & Privacy
The API key and HMAC secret in the script are Douban's **public mobile app credentials**,
extracted from the APK. They are shared by all Douban app users and do not identify you.
No personal credentials are used or stored. Data is fetched only from `frodo.douban.com`.
## Full Export (Primary Method)
```bash
DOUBAN_USER=<user_id> python3 scripts/douban-frodo-export.py
```
**Finding the user ID:** Profile URL `douban.com/people/<ID>/` — the ID is after `/people/`.
If the user provides a full URL, the script auto-extracts the ID.
**Environment variables:**
- `DOUBAN_USER` (required): Douban user ID (alphanumeric or numeric, or full profile URL)
- `DOUBAN_OUTPUT_DIR` (optional): Override output directory
**Default output** (auto-detected per platform):
- macOS: `~/Downloads/douban-sync/<user_id>/`
- Windows: `%USERPROFILE%\Downloads\douban-sync\<user_id>\`
- Linux: `~/Downloads/douban-sync/<user_id>/`
**Dependencies:** Python 3.6+ standard library only (works with `python3` or `uv run`).
**Example console output:**
```
Douban Export for user: your_douban_id
Output directory: /Users/you/Downloads/douban-sync/your_douban_id
=== 读过 (book) ===
Total: 639
Fetched 0-50 (50/639)
Fetched 50-100 (100/639)
...
Fetched 597-639 (639/639)
Collected: 639
=== 在读 (book) ===
Total: 75
...
--- Writing CSV files ---
书.csv: 996 rows
影视.csv: 238 rows
音乐.csv: 0 rows
游戏.csv: 0 rows
Done! 1234 total items exported to /Users/you/Downloads/douban-sync/your_douban_id
```
## RSS Incremental Sync (Complementary)
```bash
DOUBAN_USER=<user_id> node scripts/douban-rss-sync.mjs
```
RSS returns only the latest ~10 items (no pagination). Use Full Export first, then RSS for daily updates.
## Output Format
Four CSV files per user:
```
Downloads/douban-sync/<user_id>/
├── 书.csv (读过 + 在读 + 想读)
├── 影视.csv (看过 + 在看 + 想看)
├── 音乐.csv (听过 + 在听 + 想听)
└── 游戏.csv (玩过 + 在玩 + 想玩)
```
Columns: `title, url, date, rating, status, comment`
- `rating`: ★ to ★★★★★ (empty if unrated)
- `date`: YYYY-MM-DD (when the user marked it)
- Safe to run multiple times (overwrites with fresh data)
- Row counts may be slightly below Douban's displayed count due to delisted items
## Workflow
1. Ask for Douban user ID (from profile URL, or accept full URL)
2. Run: `DOUBAN_USER=<id> python3 scripts/douban-frodo-export.py`
3. Verify: row counts in console output should match, check with `wc -l <output_dir>/*.csv`
4. (Optional) Set up RSS sync for daily incremental updates
## Troubleshooting
See [references/troubleshooting.md](references/troubleshooting.md) for:
- Frodo API auth details (HMAC-SHA1 signature computation)
- Common errors (code 996 signature error, rate limits, pagination quirks)
- Complete failure log of all 7 tested approaches with root causes
- Alternative approaches (豆伴 extension, Tampermonkey script, browser console)
- API endpoint reference with response format
章节与文件索引
按说明文件中的顺序排列。
这个技能可以做什么
该技能不能做什么
为什么选择 Frodo API(不要使用网页抓取)
安全与隐私
完全导出(主要方法)
文件/命令 -> browser_cookie3 · requests · curl · frodo.douban.com · douban.com/people/<ID>/ · /people/ · DOUBAN_USER · DOUBAN_OUTPUT_DIR
内容校验值 -> 57c71dd2a772
当前原文的自动摘译,尚未人工审校。
这个技能可以做什么
通过 Frodo API 完全导出所有书籍/电影/音乐/游戏收藏 每日更新的 RSS 增量同步(最后约 10 项) 带有 UTF-8 BOM 的 CSV 输出(Excel 兼容),跨平台(macOS/Windows/Linux) 无需登录,无需 cookie,无需浏览器 飞行前用户 ID 验证(如果 ID 错误则快速失败)
该技能不能做什么
无法导出评论(长评)、笔记(读书笔记)或广播(广播) 无法在一次运行中按单个类别过滤(同时导出所有 4 种类型) 无法访问私人个人资料(静默返回 0 项)
为什么选择 Frodo API(不要使用网页抓取)
豆瓣在网页上使用PoW(工作量证明)挑战,阻止所有HTTP抓取。我们测试了 7 种方法——只有 Frodo API 有效。请勿尝试使用 cookie 或 Jina Reader 进行网页抓取、
browser_cookie3+requests、curl。请参阅references/troubleshooting.md,了解所有 7 种测试方法的完整失败日志以及每种方法失败的原因。安全与隐私
脚本中的API密钥和HMAC密钥是从APK中提取的豆瓣公共移动应用凭证。它们由所有豆瓣应用程序用户共享,不会识别您的身份。不使用或存储任何个人凭据。数据仅从
frodo.douban.com获取。完全导出(主要方法)
查找用户 ID:个人资料 URL
douban.com/people/<ID>/— ID 位于/people/之后。如果用户提供完整的 URL,脚本会自动提取 ID。环境变量:DOUBAN_USER(必填):豆瓣用户 ID(字母数字或数字,或完整个人资料 URL)DOUBAN_OUTPUT_DIR(可选):覆盖输出目录