← Back to Skills Marketplace
cosformula

Douban Sync

by cosformula · GitHub ↗ · v0.2.2
cross-platform ✓ Security Clean
1128
Downloads
2
Stars
1
Active Installs
10
Versions
Install in OpenClaw
/install douban-sync-skill
Description
Export and sync Douban (豆瓣) book/movie/music/game collections to local CSV files (Obsidian-compatible). Use when the user wants to export their Douban readin...
README (SKILL.md)

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.

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:

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.

Usage Guidance
This skill appears to do exactly what it claims: export Douban collections to CSV and incrementally sync via Douban RSS. Before running it, note the following: (1) You need a Node.js runtime to run the scripts; the repository imports puppeteer-core for the browser scraper and expects either puppeteer dependencies or a running browser reachable at BROWSER_URL (default http://127.0.0.1:18800). These runtime dependencies are not installed automatically. (2) The browser-based full export requires you to be logged into Douban in that browser; enabling a browser remote-debugging port can expose your browser to local/remote connections — only use it on a machine you control. (3) The scripts will create and write CSV files and a .douban-rss-state.json in the output directory (default ~/douban-sync); migrate-md-to-csv will read Markdown files from that same directory. Review the scripts if you want to confirm exact behavior. (4) If you prefer a lower-privilege option, run the RSS sync (node scripts/douban-rss-sync.mjs) which does not require login. If you plan to run the browser scraper, ensure Node and required packages are installed in a safe environment and do not expose the Chrome remote debugging port to untrusted networks.
Capability Analysis
Type: OpenClaw Skill Name: douban-sync-skill Version: 0.2.2 The OpenClaw skill bundle is classified as benign. All scripts (`douban-browser-scraper.mjs`, `douban-extract.mjs`, `douban-rss-sync.mjs`, `douban-scraper.mjs`, `migrate-md-to-csv.mjs`) align with the stated purpose of exporting and syncing Douban collections to local CSV files. File system operations are confined to the user's home directory (`~/douban-sync`), and network requests are exclusively directed to `douban.com` or a local Puppeteer instance. Input validation for `DOUBAN_USER` is present, and CSV escaping is used to mitigate potential CSV injection. The `SKILL.md` instructions are functional and do not contain any prompt injection attempts or directives for unauthorized actions. There is no evidence of data exfiltration, backdoor installation, or other malicious intent.
Capability Assessment
Purpose & Capability
The name/description match the code and behavior: scripts scrape Douban pages, parse the user's Douban RSS, migrate markdown to CSV, and write CSV files. One minor mismatch: the registry metadata lists no required binaries, but the included scripts are Node.js programs (and one script uses puppeteer-core and requires a running browser remote-debugging endpoint). The skill does not declare Node/puppeteer or a browser requirement in metadata.
Instruction Scope
SKILL.md instructs the agent to run included scripts and to supply DOUBAN_USER; the scripts only fetch Douban pages/RSS and read/write files under the configured output directory. The full-export browser mode requires the user to be logged into Douban and to run/allow a browser remote debugging endpoint; RSS mode does not require login. No instructions ask for unrelated files or secrets.
Install Mechanism
There is no install spec (instruction-only), so nothing would be automatically downloaded or installed by the installer. However, runtime dependencies (Node.js, and for browser scraping puppeteer-core plus a browser with remote-debugging enabled) are required but not declared — the skill will fail rather than install anything if those are missing.
Credentials
Only DOUBAN_USER is required (primary credential). Optional env vars used by the code (DOUBAN_OUTPUT_DIR, BROWSER_URL, STATE_FILE) are reasonable and not secrets. No other credentials or unrelated environment variables are requested.
Persistence & Privilege
always is false and the skill does not request persistent platform privileges. It writes CSV output and a small state file under the user's configured output directory (default ~/douban-sync/{user}) and will create that directory. It does not modify other skills or system settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install douban-sync-skill
  3. After installation, invoke the skill by name or use /douban-sync-skill
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.2.2
Release v0.2.2
v0.2.1
Release v0.2.1
v0.2.0
Release v0.2.0
v0.1.6
Release v0.1.6
v0.1.5
Release v0.1.5
v0.1.4
Fix SKILL.md: correct output dir and pagination description
v0.1.3
Fix pagination: use paginator next button instead of item count to handle pages with fewer items due to delisted entries
v0.1.2
Remove package.json, use git tags for versioning
v0.1.1
Remove package.json, use git tags for versioning
v0.1.0
- Initial release of douban-sync skill. - Export and sync Douban book, movie, music, and game collections to local Obsidian-compatible CSV files. - Supports full collection export via browser or script, and incremental daily sync using Douban RSS feeds. - Customizable output directory and user ID. - Automatic deduplication of items by Douban URL. - CSV files include title, URL, date, rating, status, and comment columns.
Metadata
Slug douban-sync-skill
Version 0.2.2
License
All-time Installs 2
Active Installs 1
Total Versions 10
Frequently Asked Questions

What is Douban Sync?

Export and sync Douban (豆瓣) book/movie/music/game collections to local CSV files (Obsidian-compatible). Use when the user wants to export their Douban readin... It is an AI Agent Skill for Claude Code / OpenClaw, with 1128 downloads so far.

How do I install Douban Sync?

Run "/install douban-sync-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Douban Sync free?

Yes, Douban Sync is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Douban Sync support?

Douban Sync is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Douban Sync?

It is built and maintained by cosformula (@cosformula); the current version is v0.2.2.

💬 Comments