New to Claude Skills? Learn how to install them →

daymade on GitHub

Douban Collection Export

Free

Easily export and sync your Douban collections to CSV.

Get this skill

Free · Opens the source repo

What Douban Collection Export does

The Douban Collection Export skill allows users to export their Douban collections, including books, movies, music, and games, into CSV files. This skill leverages the Frodo API, which is the only reliable method to access Douban's data since the official API was shut down in 2018. The skill provides a full export of all user collections, ensuring that you can back up your entire history without needing to log in or use a web browser. It also supports incremental updates through an RSS feed, allowing you to keep your CSV files current with the latest entries from your Douban account.

To use this skill, simply provide your Douban user ID, and the skill will handle the rest. The output is formatted in CSV with UTF-8 BOM for compatibility with Excel, making it easy to view and manipulate your data across different platforms. The skill performs user ID validation to ensure that the correct data is fetched, and it provides a clear console output detailing the number of items exported.

While this skill is powerful, it does have limitations. It cannot export reviews, notes, or broadcasts from Douban, nor can it filter exports by a single category at a time. Additionally, it cannot access private profiles, which may result in zero items being returned without any error message. Users should be aware of these constraints when planning their data export needs.

Overall, the Douban Collection Export skill is ideal for users who want a straightforward way to back up their Douban collections or keep track of their reading, watching, and listening history. Its ease of use and compatibility with multiple operating systems make it a valuable tool for anyone engaged with Douban's platform.

When to use it

Use this skill when you want to back up your Douban data or keep a record of your media collections.

When not to use it

This skill is not suitable if you need to export reviews or notes, or if you want to filter by specific categories.

What you can build with it

Backing Up Douban Collections

Use the skill to create a complete backup of your Douban media collections in CSV format.

Daily Updates via RSS

Set up the RSS sync to keep your CSV files updated with the latest items from your Douban account.

Cross-Platform Data Management

Export your Douban collections to CSV files that are compatible with Excel on macOS, Windows, and Linux.

How to install Douban Collection Export

View source

1. Install with the skills CLI

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

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by daymade

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 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)

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)

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 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

Frequently asked questions about Douban Collection Export

Similar skills