Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Zhihu Favorites Sync

gaofenggaofeng45 downloads

将知乎收藏夹中的回答和文章同步为 Obsidian Markdown 笔记。

Add to Obsidian
  • Overview
  • Scorecard
  • Updates2

将一个知乎收藏夹中的回答和文章全文导入 Obsidian,保存为带 YAML 元数据的 Markdown 文件。插件会先读取收藏夹列表,再逐条请求内容详情,避免把列表摘要误存为正文。支持分页、重复同步、正文图片本地化和失败条目隔离。

知乎的新内容 ID 可能超过 JavaScript 的安全整数范围。插件使用大整数安全解析并始终以字符串保存 ID,避免 ID 末尾被四舍五入后请求到不存在的内容。

安装

npm install
npm run build

然后把以下文件复制到 Vault 的 .obsidian/plugins/zhihu-favorites-sync/:

  • main.js
  • manifest.json
  • versions.json

重启 Obsidian,在“设置 → 第三方插件”中启用“知乎收藏同步”。也可以使用 BRAT 或符号链接进行开发安装。

配置与使用

  1. 在知乎打开目标收藏夹,从网址 https://www.zhihu.com/collection/123456789 取得收藏夹 ID。
  2. 在插件设置中点击“扫码登录”,使用知乎 App 扫码并在手机上确认。也可以在浏览器开发者工具中手动复制 Cookie。
  3. 在 Obsidian 的插件设置中填写收藏夹 ID;扫码成功后 Cookie 会自动保存。
  4. 点击左侧下载图标,或从命令面板运行“同步知乎收藏夹”。

Cookie 属于敏感登录信息,只应保存在自己的设备上,不要提交或分享插件目录中的 data.json。

扫码登录会打开一个隔离的知乎官方登录窗口,由知乎网页处理二维码、验证码和登录风控。插件只读取该窗口在本机建立的知乎 Cookie,不会读取其他网站或日常浏览器中的 Cookie;手动 Cookie 登录仍可作为备用方式。

文件规则

笔记名包含稳定的知乎类型和 ID,例如:

为什么…… [zhihu-answer-123456789].md

因此同一条内容不会重复创建。若标题在知乎发生变化,旧文件名不会被自动重命名;这是为了避免破坏 Obsidian 内部链接。

AI 自动分类

在插件设置中开启“AI 自动分类”,填写 OpenAI API Key,并按需要编辑可选分类。同步时插件会根据标题、作者和全文选择一个分类,生成标签和摘要,然后保存为:

知乎收藏/<AI 分类>/<笔记>.md

分类结果会写入 YAML 的 ai_category、ai_summary 和 tags。默认会复用已有分类,避免重复调用 API;需要重新整理时可开启“每次同步重新分类”。API Key 仅保存在当前 Vault 的插件 data.json 中,不要提交或分享该文件。

内置服务商预设:

服务商 协议 默认 Base URL 默认模型
DeepSeek OpenAI 兼容 https://api.deepseek.com deepseek-v4-flash
MiniMax OpenAI 兼容 https://api.minimaxi.com/v1 MiniMax-M2.7
OpenAI OpenAI 兼容 https://api.openai.com/v1 gpt-5.6-luna
Anthropic Anthropic Messages https://api.anthropic.com claude-sonnet-5

也可以选择“自定义”,配置任意 OpenAI Chat Completions 或 Anthropic Messages 兼容服务的 Base URL 和模型名。

限制

  • 知乎没有为此用途提供稳定的公开 API,网页接口变化后可能需要更新插件。
  • Cookie 会过期,出现 401/403 时请重新复制。
  • 仅支持 Obsidian 桌面端;移动端不会加载此插件。
  • 当前重点支持回答和专栏文章,其他收藏内容会尽力按接口返回内容导入。

开发

npm run dev

main.js 会在源码变化时自动重新构建。

HealthExcellent
ReviewSatisfactory
About
Import a Zhihu favorites folder’s answers and articles into Obsidian as Markdown files with YAML metadata. Fetch full content (not list summaries), handle pagination and duplicate syncs, localize images and isolate failures, store large Zhihu IDs as strings to avoid rounding, and optionally auto-classify notes with OpenAI/Anthropic-compatible APIs to add ai_category, ai_summary and tags.
ImportAttachmentsAI
Details
Current version
0.4.1
Last updated
4 weeks ago
Created
2 months ago
Updates
2 releases
Downloads
45
Compatible with
Obsidian 1.5.0+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
gaofenggaofeng
GitHubgao-feng
  1. Community
  2. Plugins
  3. Import
  4. Zhihu Favorites Sync

Related plugins

Nexus AI Chat Importer

Import AI chat conversations from ChatGPT, Claude, Mistral Vibe, Perplexity* and Grok* exports into Obsidian as clean, readable Markdown files.

Local Images Plus

A reincarnation of Local Images to download images in Markdown notes to local storage.

Local GPT

Local Ollama and OpenAI-like GPT's assistance for maximum privacy and offline access.

Whisper

Speech-to-text using OpenAI Whisper.

Snipd Official

Sync Snipd podcast highlights to your vault with transcript, notes, AI summaries and metadata.

Plaud Sync

Sync Plaud voice recordings into Markdown notes with transcripts, AI summaries, and highlights.

Epub Importer

Import EPUB files as Markdown.

Importer

Convert your data to Markdown files you can use in Obsidian. Works with Apple Notes, OneNote, Evernote, Notion, Google Keep, and many other formats.

Claudian

Embeds Claude Code/Codex and other local Agents as AI collaborators in your vault.

Smart Connections

Find related notes and excerpts while writing. Your AI link building copilot displays relevant content in graph + list view. A local embedding model powers semantic search. Zero setup. No API key.