Skip to main content
skill CX Codex

douban-skill — Claude Code skill: export Douban collections

Pulls books, movies, music and games out of a Douban profile into CSV files, with RSS sync for new entries.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add daymade/claude-code-skills --skill douban-skill -a claude-code
Open on GitHub

What douban-skill does

Douban offers no official export, and its public API shut down in 2018. This skill goes through the Frodo API instead: scripts/douban-frodo-export.py walks the full history across four categories and writes 书.csv, 影视.csv, 音乐.csv and 游戏.csv. Columns are plain — title, url, date, rating, status, comment. Files come out as UTF-8 with BOM, so Excel opens them without fiddling.

No login, no cookies. You only need the user ID from a profile URL like douban.com/people/<ID>/; paste the whole URL and the script extracts the ID itself. Python 3.6+ standard library is enough, nothing to install. For daily updates there is a second script, scripts/douban-rss-sync.mjs, which reads the RSS feed.

Know the limits before you run it. Reviews, reading notes and broadcasts are not exported, and one run dumps all four categories at once — there is no way to ask for books only. A private profile returns zero items with no error, so an empty CSV is worth double-checking. Scraping the website will not work either: Douban guards pages with a proof-of-work challenge, and the author tried seven approaches before settling on Frodo.

What it helps with

  • export a full reading history to CSV
  • back up a Douban profile before it changes
  • set up a daily pull of new entries
  • collect movies and music into one set of files
  • validate the user ID before a long export

Example prompts for the agent

  • export my Douban collections to CSV, my ID is your_douban_id
  • set up daily RSS sync for my Douban profile
  • pull books, movies, music and games from douban.com/people/your_douban_id/

How to install douban-skill

1Skills CLI (Vercel)

npx skills add daymade/claude-code-skills --skill douban-skill -a claude-code

2Manually: put the files in place

~/.claude/skills/douban-skill/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/douban-skill/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about douban-skill

How do I install douban-skill in Claude?

Run npx skills add daymade/claude-code-skills --skill douban-skill -a claude-code. The skill lands at ~/.claude/skills/douban-skill/SKILL.md.

What does douban-skill do?

It exports Douban book, movie, music and game collections into four CSV files and can pull recent entries through RSS.

Do I need to log in to Douban?

No. The script works from the user ID and talks only to frodo.douban.com; no personal credentials are used or stored.

Source text

SKILL.md · MIT
---
name: douban-skill
description: >
  Export and sync Douban (豆瓣) book/movie/music/game collections to local CSV files via Frodo API.
  Supports full export (all history) and RSS incremental sync (recent items).
  Use when the user wants to export Douban reading/watching/listening/gaming history,
  back up their Douban data, set up incremental sync, or mentions 豆瓣/douban collections.
  Triggers on: 豆瓣, douban, 读书记录, 观影记录, 书影音, 导出豆瓣.
---

# 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

© daymade · MIT · daymade/claude-code-skills

Similar skills

All skills for Automation and no-code: n8n, Zapier, Make →

From the same set68

product-analysis This skill sends parallel agents to inspect a project and combines their findings into an improvement plan. Use it to review UX, APIs, architecture, or docs. CX Codex +1 873installs doc-to-markdown Turns DOCX, PDF, PPTX and saved HTML into clean Markdown and fixes the usual conversion damage on its own. Useful when you need the text out of a document without hand-editing. CX Codex +1 872installs scrapling-skill A skill that walks the agent through installing Scrapling CLI, picking a static or browser-backed fetcher, and checking the saved file instead of trusting an exit code. CX Codex +1 788installs fixing-claude-export-conversations Repairs a Claude conversation exported as a .txt file: rejoins paragraphs, rebuilds tables and paths that hard wrapping tore apart. CX Codex +1 760installs terraform-skill Works out why terraform plan says "No changes" while the site is down, and keeps a rollout from touching someone else's service on a shared host. CX Codex +1 710installs marketplace-dev Turns a skills repo into a Claude plugin marketplace: generates marketplace.json, adds plugin entries, and moves skills between suites. CX Codex +1 695installs tunnel-doctor Diagnoses network routing and throughput failures caused by Tailscale, proxy, and TUN conflicts on macOS or Windows/WSL. Helps when pings succeed but SSH or HTTP fails. CX Codex +1 678installs debugging-network-issues A methodology for network, streaming and protocol failures where the obvious cause is probably wrong. CX Codex +1 675installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor