← 返回 Skills 市场
cosformula

Douban Sync

作者 cosformula · GitHub ↗ · v0.2.2
cross-platform ✓ 安全检测通过
1128
总下载
2
收藏
1
当前安装
10
版本数
在 OpenClaw 中安装
/install douban-sync-skill
功能描述
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...
使用说明 (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.

安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install douban-sync-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /douban-sync-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug douban-sync-skill
版本 0.2.2
许可证
累计安装 2
当前安装数 1
历史版本数 10
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1128 次。

如何安装 Douban Sync?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install douban-sync-skill」即可一键安装,无需额外配置。

Douban Sync 是免费的吗?

是的,Douban Sync 完全免费(开源免费),可自由下载、安装和使用。

Douban Sync 支持哪些平台?

Douban Sync 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Douban Sync?

由 cosformula(@cosformula)开发并维护,当前版本 v0.2.2。

💬 留言讨论