qiaomu-anything-to-notebooklm
Multi-source intelligent content processor: supports WeChat Official Accounts, web pages, YouTube, podcasts (Xiaoyuzhou/Ximalaya), PDFs, Markdown, and more. Automatically uploads content to NotebookLM and generates podcasts, presentations (PPT), mind maps, and various other formats. Features an in-depth analysis mode and automated Lark/Feishu document creation.
1How It Works & Mechanism
The core design combines a massive SKILL.md routing table with a few proprietary scripts and extensive external CLI/MCP tools: SKILL.md maps 15+ content sources to distinct extraction pipelines using an input characteristic table, delegating unified uploads and generation to the notebooklm CLI.
| `https://mp.weixin.qq.com/s/` | 微信公众号 | MCP 工具抓取 |
The built-in CLI (main.py) covers significantly fewer input types than claimed in SKILL.md: the code only implements epub, document, podcast, x_twitter, and url, reporting 'unsupported input type' for anything else.
不支持的输入类型: {input_type}
Podcast/Bilibili audio transcription relies on three GetNote (得到/Get笔记) APIs: OpenAPI creates linked notes → polls task progress (up to 40 × 30s) → Web API fetches the full transcript, saving the output as a TXT file.
for i in range(40):
Fetching X/Twitter and paywalled pages relies on a cascading strategy in fetch_url.sh: it first attempts conversion to Markdown via third-party proxies (r.jina.ai, defuddle.md), falling back to spoofing Googlebot/Bingbot User-Agents, X-Forwarded-For, Referer, AMP, and JSON-LD, and finally trying archive.today, Google Cache, and npx agent-fetch.
# 1a. r.jina.ai — wide coverage, preserves image links, often bypasses paywalls
Extracted content is uniformly handed over to the external notebooklm CLI (notebooklm-py) for upload and artifact generation; this repository does not implement the NotebookLM protocol internally.
['notebooklm', 'create', title],
Deep Analysis Mode executes a fixed 3-round progressive interrogation template (4+5+3 = 12 questions, or 10 questions in SKILL.md), invoking notebooklm ask sequentially with 1.5-second pauses, outputting results to /tmp/*_analysis.json.
- 第一轮(4题):建立整体认知框架
The optional Lark/Feishu document generation does not directly invoke open platform APIs; instead, it delegates to the external lark-cli by formatting the Q&A into Markdown and executing lark-cli docs +create.
['lark-cli', 'docs', '+create', '--title', title, '--markdown', markdown_content],
WeChat Official Account content extraction depends on a separate MCP server repository (using Playwright browser emulation), which install.sh clones into the skill directory while prompting the user to manually edit Claude configuration.
git clone https://github.com/Bwkyd/wexin-read-mcp.git "$MCP_DIR"
Includes an isolated Feishu read MCP sub-package (FastMCP + Playwright) decoupled from the primary Skill workflow, offering read_feishu_doc and get_doc_info tools.
mcp = FastMCP("feishu-reader")
YouTube handling is marked as the 'highest priority' special rule: URLs must be forwarded directly to NotebookLM, strictly banning any local subtitle download or transcription steps.
- **禁止**使用 yt-dlp、yt-search-download、whisper、浏览器自动化等手段下载字幕
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | notebooklm(notebooklm-py CLI) |
| cli | python3 ≥ 3.9 |
| cli | git |
| cli | curl |
| cli | markitdown(Microsoft) |
| cli | lark-cli(飞书文档 CLI) |
| cli | npx(agent-fetch 兜底) |
| api | Get笔记 / 得到(笔记与转写) |
| api | NotebookLM(Google) |
| network | 第三方抓取代理/存档 |
| network | 被绕过站点(付费墙/社交) |
| network | 飞书(读取:Playwright 浏览器抓文档;写入:lark-cli) |
| network | 微信公众号(经外部 MCP) |
| package | Python 依赖(MCP 与转换链) |
| package | pip 直装 git 源 |
4Recommended Governance & Evidence
- SKILL.md / 脚本参数: Contains anti-bot detection evasion, host sandbox disabling, or SSL verification bypassing.
- SKILL.md / 会话存储: Reads or reuses browser authentication states and session cookies.
- scripts/: Executes local scripts or commands: install.sh (executed by the user during installation: pip install, playwright install chromium, git clone for external MCP).
- scripts/ 或 SKILL.md: Declares dynamic installation of external language package dependencies.
- 网络端点: Declares external network access: openapi.biji.com / notes-api.biji.com / get-notes.luojilab.com (GetNote: creating notes, refreshing tokens, fetching transcripts).
- 本地工作目录: Performs file read/write operations and artifact export: /tmp/*.txt (stores extracted source content; SKILL.md states these are cleaned up upon system reboot).
5Second-Pass Verification
- [ok] skill.path 定位与 commit 一致性 — 单 skill 仓库,SKILL.md 在仓库根,故 path='.';工作副本 HEAD cea6ceee8cdcd01a573af5ae75c2d3cffc20650b,任务表 pin cea6ceee8cdc,PINS-b2.json 记 {dir: qiaomu-anything-to-notebooklm, commit: cea6ceee8cdc}。
- [discrepancy] SKILL.md 宣称的内容源 vs main.py 实际覆盖 — SKILL.md/README 宣称 15+ 类源;main.py 的 main() 只有 epub/document/podcast/x_twitter/url 五个分支,其余(微信、图片、音频、Office、ZIP、搜索)不在本仓代码内,靠外部 MCP 与宿主工具完成。「不支持的输入类型」是代码里的真实兜底分支。
- [discrepancy] README 结构图与实际文件树 — README 项目结构图与 SKILL.md 前置条件都列 wexin-read-mcp/(并给出 <skill>/wexin-read-mcp/src/server.py 的配置路径),但本 pin 仓库内不存在该目录(ls 报 No such file or directory),只有名称不同的 feishu-read-mcp/。该目录只在用户执行 install.sh 后由 git clone 产生;check_env.py 也检查这个不存在的路径。
- [discrepancy] fetch_url.sh 的『6 层级联』是否真的可走完 — 第 4 级 archive.today 之后为无条件 `exit 75`(脚本在这里结束进程),Level 5(Google Cache)与 Level 6(agent-fetch)在代码上不可达;README 的『6 层级联』流程图因此比实际执行多两级。exit 75 的设计意图是让调用方去浏览器解 CAPTCHA 后重试,属有意为之,但副作用未在文档说明。
- [discrepancy] feishu-read-mcp/src/server.py 是否可运行 — 该文件使用 `cookies_str: Optional[str] = None` 标注,但全文只 import sys / pathlib.Path / fastmcp / logging,没有 from typing import Optional——注解在函数定义时求值,导入即 NameError。本仓不含该服务器的测试,check_env.py 也不检查它(只查 wexin-read-mcp)。
- [ok] 『13 项环境检查』是否属实 — check_env.py 累加结果共 13 项:Python 版本 1 + 核心模块 5(fastmcp/playwright/bs4/lxml/markitdown)+ Playwright 导入 1 + notebooklm/markitdown/git 三个 CLI 3 + MCP 文件 1 + MCP 配置 1 + NotebookLM 认证 1;与 README 的『13 项环境检查』一致。
- [discrepancy] 深度分析问题数(SKILL.md 10 问 vs main.py / README 12 问) — SKILL.md 意图映射表写「自动生成10个问题并递归提问」、Step 4 的示例 JSON 也写 total_questions: 10;而 main.py 的模板是 4+5+3=12 问,README 场景 3 同样写「生成 12 个问题」(Step 4 另一处又是 10 问)。同一文档内自相矛盾。
- [discrepancy] SKILL.md 章节编号连续性与内容重复 — 『支持的内容源』下出现两个 5(付费墙、YouTube)、两个 4(Office 文档、播客/音频平台)、两个 5(播客/音频平台、电子书与文档),编号重复且与 README 的 15+ 计数对不上;YouTube 与付费墙内容还被重复叙述一次(含一段孤立的绕过策略 5 条列表挂在 YouTube 规则下)。
6Verdict & Scenarios
8f32da1fd86d07e0…