douban-sync-skill

Data & Analytics
v0.2.2
Benign

Export and sync Douban (豆瓣) book/movie/music/game collections.

2796 downloads796 installsby @cosformula

Setup & Installation

Install command

clawhub install cosformula/douban-sync-skill

If the CLI is not installed:

Install command

npx clawhub@latest install cosformula/douban-sync-skill

Or install with OpenClaw CLI:

Install command

openclaw skills install cosformula/douban-sync-skill

or paste the repo link into your assistant's chat

Install command

https://github.com/openclaw/skills/tree/main/skills/cosformula/douban-sync-skill

What This Skill Does

Exports Douban collections (books, movies, music, games) to local CSV files and keeps them in sync via RSS. Supports full scrape on first run and lightweight daily incremental updates without login. Output is compatible with Obsidian and other tools that read CSV.

RSS-based incremental sync avoids repeated full scrapes and works without login, making daily automation practical without hitting rate limits.

When to Use It

  • Exporting your entire Douban reading history to a local file
  • Setting up a daily cron job to auto-sync new Douban activity
  • Migrating Douban data to Obsidian for personal knowledge management
  • Backing up game and music collections before account changes
  • Reviewing watch/read history offline without logging into Douban
View original SKILL.md file
# Douban Sync

Export Douban collections (books, movies, music, games) to CSV and keep them in sync via RSS.

## Two Modes

### 1. Full Export (first time)

Use the browser tool to scrape all collection pages. Requires the user to be logged into Douban.

```
browser → douban.com/people/{USER_ID}/{category}?start=0&sort=time&mode=list
```

Categories and URL paths:
- Books: `book.douban.com/people/{ID}/collect` (读过), `/do` (在读), `/wish` (想读)
- Movies: `movie.douban.com/people/{ID}/collect` (看过), `/do` (在看), `/wish` (想看)
- Music: `music.douban.com/people/{ID}/collect` (听过), `/do` (在听), `/wish` (想听)
- Games: `www.douban.com/people/{ID}/games?action=collect` (玩过), `=do` (在玩), `=wish` (想玩)

Each page shows up to 30 items in list mode (some pages may have fewer due to delisted entries). Paginate with `?start=0,30,60...` — the script uses the paginator's "next" button to determine whether to continue.

**Rate limiting:** Wait 2-3 seconds between pages. If blocked, wait 30 seconds and retry.

**Scripts:**
- `scripts/douban-scraper.mjs` — HTTP-only, no browser needed (may get rate-limited)
- `scripts/douban-browser-scraper.mjs` — via Puppeteer CDP, needs a running browser
- `scripts/douban-extract.mjs` — generates a browser console script for manual extraction

### 2. Incremental Sync (daily, via RSS)

Run `scripts/douban-rss-sync.mjs` — no login needed.

```bash
node scripts/douban-rss-sync.mjs
```

**Setup:** Set environment variables:
- `DOUBAN_USER` (required): Douban user ID
- `DOUBAN_OUTPUT_DIR` (optional): Output root directory, default `~/douban-sync`

**Recommended:** Add a daily cron job for automatic sync.

## Output Format

Four CSV files per user in the output directory:

```
douban-sync/
└── {user_id}/
    ├── 书.csv
    ├── 影视.csv
    ├── 音乐.csv
    └── 游戏.csv
```

CSV columns:
```csv
title,url,date,rating,status,comment
"书名","https://book.douban.com/subject/12345/","2026-01-15","★★★★★","读过","短评内容"
```

- `status`: 读过/在读/想读, 看过/在看/想看, 听过/在听/想听, 玩过/在玩/想玩

## Deduplication

Both full export and RSS sync deduplicate by Douban URL — safe to run multiple times.

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: Exporting your entire Douban reading history to a local file

AGENT
  1. 1Exporting your entire Douban reading history to a local file
  2. 2Setting up a daily cron job to auto-sync new Douban activity
  3. 3Migrating Douban data to Obsidian for personal knowledge management
  4. 4Backing up game and music collections before account changes
  5. 5Reviewing watch/read history offline without logging into Douban
OUTPUT
Export and sync Douban (豆瓣) book/movie/music/game collections.

Share this skill

Security Audits

VirusTotalBenign
OpenClawBenign
View full report

These signals reflect official OpenClaw status values. A Suspicious status means the skill should be used with extra caution.

Details

LanguageMarkdown
Last updatedFeb 25, 2026