原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。使用 Google 登录即可撰写评价。原型 · 每 30 分钟更新
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

XiaohongshuSkills Skill

代码仓库 ↗

作者:white0dew★ 3,6191 个 skill

安装

What it does

支持小红书自动发布、自动评论、自动检索的 Skill。支持 OpenClaw、Codex、CC 等

  • Connects Instruction files the AI reads, with steps that call an outside service
  • Account or key Some steps need a key for XSEC_TOKEN (per the README)
  • Category 其他
给作者:在 README 中加徽章

如果你是作者,可把这段代码贴到 README。徽章会链接回本页。

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/skill/white0dew-xiaohongshuskills.svg)](https://mcp.popnx.com/en/skills/white0dew-xiaohongshuskills)

相似的 Skill

同类工作,排序与 Skill 列表相同

与相似项目对比
本项
XiaohongshuSkills
llmfitclaude-videoVideoCaptionerclaude-cookbooks
作者white0dewAlexsJonesbradautomatesWEIFENG2333anthropics
Skill 数11114
GitHub 星标3,61939,09621,24916,57754,867
最近代码更新2026年11月18日2026年11月18日2026年9月25日2026年9月12日2026年11月17日
许可证MITMITMITGPL-3.0MIT

white0dew 提供的 1 个 Skill(指令集),AI 读取后照做 · 不是 MCP server

Skill 和 MCP 有什么不同

MCP = 手

把 AI 连到外部服务或数据,例如读取 Notion 或开发票。需要有程序或服务器在运行。

Skill = 手册

教 AI 怎么做某项工作的文本文件,不连接任何服务。

有些会重叠:少数 Skill 带有调用工具的脚本,少数 MCP 只提供知识。请从你想完成的工作出发。

适用的应用

Claude CodeOpenCode

依据开发者 README 和 repo 中的文件夹

安装

Is it safe?

  • Who made it

    GitHub account white0dew (person), 7 years old

  • Use and upkeep

    ★ 3,619 stars · code last changed 2026年11月18日

  • Any scripts?

    8 scripts that can run on a computer: scripts/account_manager.py, scripts/cdp_publish.py, scripts/chrome_launcher.py, scripts/feed_explorer.py and 4 more

  • Uses the internet?

    Scripts that go online: scripts/image_downloader.py, scripts/generate_star_history.py, scripts/chrome_launcher.py, scripts/cdp_publish.py

  • Changes machine-wide settings?

    No hooks or writes to machine settings found

Checked automatically from the repo files at commit 0c89ba7 (read only, nothing was run). Not a safety guarantee: read it and decide for yourself

第一步:你用哪个 AI?

选择你用的应用,本页只显示该应用的安装方法

Option 1Upload to claude.ai (web and app)

  • Files are byte-for-byte the same as on GitHub at commit 0c89ba7 · View on GitHub ↗

  • 8 scripts

  • Once uploaded it runs on Claude’s systems, not on your computer. No need to unzip

Look inside before downloading

All 20 files · 1.4 MB

  • AGENTS.md2 KB
  • LICENSE1 KB
  • README.md18 KB
  • SKILL.md14 KB
  • assets/apimart-banner.png993 KB
  • assets/star-history.svg8 KB
  • config/accounts.json.example1 KB
  • docs/claude-code-integration.md3 KB
  • docs/code-review-2026-03-07.md9 KB
  • public/whitedew.jpg112 KB
  • requirements.txt1 KB
  • scripts/account_manager.py9 KB
  • scripts/cdp_publish.py188 KB
  • scripts/chrome_launcher.py11 KB
  • scripts/feed_explorer.py28 KB
  • scripts/generate_star_history.py7 KB
  • scripts/image_downloader.py7 KB
  • scripts/publish_pipeline.py22 KB
  • scripts/run_lock.py3 KB
  • todo.md1 KB
  1. Download redbookskills.zip

    1.4 MB · 20 files · MIT license (license file included in the folder)

    Download redbookskills.zip

  2. Open Skills on claude.ai and upload

    +Create skillUpload a skillpick redbookskills.zip

    Open claude.ai/customize/skills ↗

  3. No Upload button? Turn on file creation first

    SettingsCapabilitiesCode execution and file creation

    Turn on Code execution and file creation first (newer menus: Create and edit files) · personal plans: Settings → Capabilities · Team/Enterprise: an admin turns it on under Organization settings → Plugins & skills · every plan, including Free

Upload once; it works in claude.ai and Claude Desktop, and in recent Claude Code signed in with a Claude account (not with an API key)

Cowork and cloud sessions use the skills turned on in your claude.ai account, not ~/.claude/skills on your computer (Claude Desktop scheduled tasks run locally and still load it)

Checked against official docs 2026年11月12日 · Source: support.claude.com, support.claude.com, code.claude.com

Option 1让 Claude Code 帮你安装

复制这句话,粘贴到 Claude Code 的对话中

Where to install
Please install the skill redbookskills from https://github.com/white0dew/xiaohongshuskills (commit 0c89ba7) for all my projects, at ~/.claude/skills/redbookskills. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill redbookskills from https://github.com/white0dew/xiaohongshuskills (commit 0c89ba7) into the project this chat is open in (at .claude/skills/redbookskills). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

重新打开 Claude Code,输入 /XiaohongshuSkills,或直接提出相关任务,Claude 会自动选用

Checked against official docs 2026年11月12日 · Source: code.claude.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.claude/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/white0dew/xiaohongshuskills.git /tmp/popnx-skill-white0dew-xiaohongshuskills-0c89ba7 && mkdir -p ~/.claude/skills && cp -R '/tmp/popnx-skill-white0dew-xiaohongshuskills-0c89ba7/.' ~/.claude/skills/xiaohongshuskills
  3. 重新打开 Claude Code,输入 /XiaohongshuSkills,或直接提出相关任务,Claude 会自动选用

自己安装的 Skill 可用于 ChatGPT 桌面应用、Codex CLI 和 IDE 中的 Codex 扩展 · 网页版和手机版 ChatGPT 不能使用自己安装的 Skill,只能使用目录中插件自带的 Skill

ChatGPT 桌面应用

ChatGPT 桌面应用内置 Codex,Codex 从 ~/.agents/skills 文件夹读取 Skill

Option 1让 ChatGPT 帮你安装

在 ChatGPT 桌面应用中打开 Codex,把这句话粘贴到对话中

Where to install
Please install the skill redbookskills from https://github.com/white0dew/xiaohongshuskills (commit 0c89ba7) for all my projects, at ~/.agents/skills/redbookskills. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill redbookskills from https://github.com/white0dew/xiaohongshuskills (commit 0c89ba7) into the project this chat is open in (at .agents/skills/redbookskills). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Option 2自己放入文件夹

把 redbookskills 文件夹放到 ~/.agents/skills/redbookskills

~ 是你的主文件夹($HOME)

不用终端:下载 ZIP,解压后把 redbookskills 文件夹移到 ~/.agents/skills

下载 redbookskills.zip

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.agents/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/white0dew/xiaohongshuskills.git /tmp/popnx-skill-white0dew-xiaohongshuskills-0c89ba7 && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-white0dew-xiaohongshuskills-0c89ba7/.' ~/.agents/skills/xiaohongshuskills

安装之后

  • ChatGPT 桌面应用:打开侧边栏中的 Skills,确认 Skill 已出现
  • 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称
  • Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

网页版和手机版 ChatGPT

不能使用你自己安装的 Skill,只能使用目录中插件自带的 Skill

想在 ChatGPT 中使用这个 Skill,请按上面的方法使用 ChatGPT 桌面应用

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

Option 1让 Codex 帮你安装

复制这句话,粘贴到 Codex 的对话中 · 适用于 ChatGPT 桌面应用中的 Codex、Codex CLI 和 IDE 扩展

Where to install
Please install the skill redbookskills from https://github.com/white0dew/xiaohongshuskills (commit 0c89ba7) for all my projects, at ~/.agents/skills/redbookskills. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill redbookskills from https://github.com/white0dew/xiaohongshuskills (commit 0c89ba7) into the project this chat is open in (at .agents/skills/redbookskills). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex · 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.agents/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/white0dew/xiaohongshuskills.git /tmp/popnx-skill-white0dew-xiaohongshuskills-0c89ba7 && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-white0dew-xiaohongshuskills-0c89ba7/.' ~/.agents/skills/xiaohongshuskills
  3. 重新打开 Codex 并提出相关任务,Codex 会列出这个 skill

Option 1让 Cursor 帮你安装

复制这句话,粘贴到 Cursor 的对话中

Where to install
Please install the skill redbookskills from https://github.com/white0dew/xiaohongshuskills (commit 0c89ba7) for all my projects, at ~/.cursor/skills/redbookskills. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill redbookskills from https://github.com/white0dew/xiaohongshuskills (commit 0c89ba7) into the project this chat is open in (at .cursor/skills/redbookskills). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

在 Cursor 的 Agent 聊天中输入 / 并选择 XiaohongshuSkills

Checked against official docs 2026年11月12日 · Source: cursor.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.cursor/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/white0dew/xiaohongshuskills.git /tmp/popnx-skill-white0dew-xiaohongshuskills-0c89ba7 && mkdir -p ~/.cursor/skills && cp -R '/tmp/popnx-skill-white0dew-xiaohongshuskills-0c89ba7/.' ~/.cursor/skills/xiaohongshuskills
  3. 在 Cursor 的 Agent 聊天中输入 / 并选择 XiaohongshuSkills

Option 1Let the AI install it

适用于其他能读取 Skill 的应用。这句话列出了 Claude Code、Codex 和 Cursor 的路径,AI 会按你的应用选择 · Copy this sentence into the app’s chat

Where to install
Please install the skill redbookskills from https://github.com/white0dew/xiaohongshuskills (commit 0c89ba7) for all my projects, at ~/.claude/skills/redbookskills (in Codex use ~/.agents/skills/redbookskills, in Cursor ~/.cursor/skills/redbookskills). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill redbookskills from https://github.com/white0dew/xiaohongshuskills (commit 0c89ba7) into the project this chat is open in (at .claude/skills/redbookskills; in Codex use .agents/skills/redbookskills, in Cursor .cursor/skills/redbookskills). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Checked against official docs 2026年11月12日 · Source: code.claude.com, learn.chatgpt.com, cursor.com

For Terminal users

其他支持 Agent Skills 的应用(如 Gemini CLI、GitHub Copilot)使用不同文件夹,请查看该应用的指南,再把含 SKILL.md 的文件夹复制过去。

在 GitHub 上查看 ↗

已于 2026年11月11日 对照 Claude Code、Codex 和 Cursor 官方指南核实 skill 文件夹

✓ 命令已检查 2026年11月18日

查看原始 SKILL.md

以下文字来自开发者的 repo,不是 PopNx MCP 的指令

显示前 8,000 个字符 · 在 GitHub 打开完整文件

---
name: RedBookSkills
description: |
  将图文/视频内容自动发布到小红书(XHS),并支持登录检查、内容检索与互动操作。
  适用场景:发布图文、发布视频、仅启动测试浏览器、获取登录二维码、首页推荐抓取、搜索笔记、评论互动、抓取内容数据。
metadata:
  trigger: 发布内容到小红书
  source: Angiin/Post-to-xhs
---

# Post-to-xhs

你是“小红书发布助手”。目标是在用户确认后,调用本 Skill 的脚本完成发布或互动操作。

## 风险提示(重要)

**使用本 Skill 进行小红书自动化,存在被平台风控、限流、封号或封禁账号的风险。**

默认提醒用户优先使用测试号、小流量运行,并对最终内容进行人工复核。使用者需自行评估并承担相关风险。

## 输入判断

优先按以下顺序判断:
1. 用户明确要求"测试浏览器 / 启动浏览器 / 检查登录 / 获取登录二维码 / 只打开不发布":进入测试浏览器流程。
2. 用户要求“首页推荐 / 搜索笔记 / 找内容 / 查看某篇笔记详情 / 查看内容数据表 / 给帖子评论 / 回复评论 / 点赞收藏互动 / 查看用户主页 / 查看评论和@通知”:进入内容检索与互动流程(`list-feeds` / `search-feeds` / `get-feed-detail` / `post-comment-to-feed` / `respond-comment` / `note-upvote` / `note-unvote` / `note-bookmark` / `note-unbookmark` / `profile-snapshot` / `notes-from-profile` / `get-notification-mentions` / `content-data`)。
3. 用户已提供 `标题 + 正文 + 视频(本地路径或 URL)`:直接进入视频发布流程。
4. 用户已提供 `标题 + 正文 + 图片(本地路径或 URL)`:直接进入图文发布流程。
5. 用户只提供网页 URL:先提取网页内容与图片/视频,再给出可发布草稿,等待用户确认。
6. 信息不全:先补齐缺失信息,不要直接发布。

## 必做约束

- 发布前必须让用户确认最终标题、正文和图片/视频。
- 图文发布时,没有图片不得发布(小红书发图文必须有图片)。
- 视频发布时,没有视频不得发布。图片和视频不可混合使用(二选一)。
- 默认使用无头模式;若检测到未登录,切换有窗口模式登录。
- 标题长度不超过 38(中文/中文标点按 2,英文数字按 1)。
- 用户要求"仅测试浏览器"时,不得触发发布命令。
- 如使用文件路径,优先使用绝对路径;若用户给的是相对路径,先转换为绝对路径再执行命令。
- 若发布页结构异常,优先检查 `scripts/cdp_publish.py` 里的 `SELECTORS`、多图上传等待、正文编辑器与发布按钮点击逻辑;这些是最容易被小红书网页改版影响的区域。

## 测试浏览器流程(不发布)

1. 启动 post-to-xhs 专用 Chrome(默认有窗口模式,便于人工观察)。
2. 如用户要求静默运行,再使用无头模式。
3. 可选:执行登录状态检查并回传结果。
4. 结束后如用户要求,关闭测试浏览器实例。

## 图文发布流程

1. 准备输入(标题、正文、图片 URL 或本地图片)。
2. 如需文件输入,先写入 `title.txt`、`content.txt`。
3. 执行发布命令(默认无头)。
4. 回传执行结果(成功/失败 + 关键信息)。

## 视频发布流程

1. 准备输入(标题、正文、视频文件路径或 URL)。
2. 如需文件输入,先写入 `title.txt`、`content.txt`。
3. 执行视频发布命令(默认无头)。视频上传后需等待处理完成。
4. 回传执行结果(成功/失败 + 关键信息)。

## 内容检索与互动流程(搜索/详情/评论/内容数据)

1. 先检查小红书主页登录状态(`XHS_HOME_URL`,非创作者中心)。
2. 若用户需要首页推荐流,执行 `list-feeds` 获取首页推荐笔记列表。
3. 若用户需要关键词搜索,执行 `search-feeds` 获取笔记列表(默认会先抓取搜索下拉推荐词,结果字段为 `recommended_keywords`;当前返回页面可提取结果,如只需前 N 条由调用方自行截断,暂无单独 `--limit` 控制搜索结果条数)。
4. 若用户需要详情,从搜索结果中取 `id` + `xsecToken` 再执行 `get-feed-detail`;如用户明确要更多评论,可加 `--load-all-comments` 等参数。
5. 若用户需要发表评论,执行 `post-comment-to-feed`(一级评论;必填 `feed_id` / `xsec_token` / `content`)。
6. 若用户需要回复某条评论,执行 `respond-comment`(可用 `comment_id` / `comment_author` / `comment_snippet` 定位目标评论)。
7. 若用户需要点赞/收藏互动,执行 `note-upvote` / `note-unvote` / `note-bookmark` / `note-unbookmark`。
8. 若用户需要用户主页信息,执行 `profile-snapshot` 或 `notes-from-profile`。
9. 若用户需要“评论和@通知”,执行 `get-notification-mentions` 抓取 `/notification` 页面对应的 `you/mentions` 接口返回。
10. 若用户需要“笔记基础信息表”,执行 `content-data` 获取曝光/观看/点赞等指标。
11. 回传结构化结果(数量、核心字段、链接)。

## 常用命令

### 参数顺序提醒(`cdp_publish.py` / `publish_pipeline.py`)

请严格按下面顺序写命令,避免 `unrecognized arguments`:

- 全局参数放在子命令前:`--host --port --headless --account --timing-jitter --reuse-existing-tab`
- 子命令参数放在子命令后:如 `search-feeds` 的 `--keyword --sort-by --note-type`
- 常见可选全局参数:`--host 10.0.0.12 --port 9222 --reuse-existing-tab --account NAME`

示例(正确):

```bash
python scripts/cdp_publish.py --reuse-existing-tab search-feeds --keyword "春招" --sort-by 最新 --note-type 图文
```

### 0) 启动 / 测试浏览器(不发布)

默认 CDP 地址为 `127.0.0.1:9222`;可按需叠加 `--host` / `--port` 指向远程 Chrome。

```bash
# 启动测试浏览器(有窗口,推荐)
python scripts/chrome_launcher.py

# 可选:无头启动
python scripts/chrome_launcher.py --headless

# 检查当前登录状态
python scripts/cdp_publish.py check-login

# 常见变体:优先复用已有标签页
python scripts/cdp_publish.py --reuse-existing-tab check-login

# 远程 CDP 检查登录
python scripts/cdp_publish.py --host 10.0.0.12 --port 9222 check-login

# 获取登录二维码(返回 Base64,可供远程前端展示扫码)
python scripts/cdp_publish.py get-login-qrcode

# 重启 / 关闭测试浏览器
python scripts/chrome_launcher.py --restart
python scripts/chrome_launcher.py --kill
```

### 0.5) 首次登录 / 重新登录

```bash
# 本地 Chrome 登录
python scripts/cdp_publish.py login

# 远程 CDP 登录(不会自动重启远程 Chrome)
python scripts/cdp_publish.py --host 10.0.0.12 --port 9222 login
```

### 1) 准备 title.txt / content.txt

若用户给的是标题和正文,可先写入临时文件再执行命令:

```bash
printf '%s\n' '这里是标题' > /abs/path/title.txt
printf '%s\n' '这里是正文' > /abs/path/content.txt
```

### 2) 无头发布 or 有头预览 —— 使用图片 URL 发布

```bash
# 默认推荐:无头自动发布
python scripts/publish_pipeline.py --headless \
  --title-file /abs/path/title.txt \
  --content-file /abs/path/content.txt \
  --image-urls "https://example.com/1.jpg" "https://example.com/2.jpg"

# 仅预览:停留在发布页人工确认
python scripts/publish_pipeline.py \
  --preview \
  --title-file /abs/path/title.txt \
  --content-file /abs/path/content.txt \
  --image-urls "https://example.com/1.jpg" "https://example.com/2.jpg"

# 常见变体:远程 CDP / 复用已有标签页
python scripts/publish_pipeline.py --host 10.0.0.12 --port 9222 --reuse-existing-tab \
  --title-file /abs/path/title.txt \
  --content-file /abs/path/content.txt \
  --image-urls "https://example.com/1.jpg"
```

说明:当 `--host` 不是 `127.0.0.1/localhost` 时,脚本会跳过本地 `chrome_launcher.py` 的自动启动/重启逻辑。
说明:`publish_pipeline.py` 默认自动点击发布;如需停留在发布页人工确认,请加 `--preview`。

### 3) 无头发布 or 有头预览 —— 使用本地图片发布

```bash
# 本地图片发布
python scripts/publish_pipeline.py --headless \
  --title-file /abs/path/title.txt \
  --content-file /abs/path/content.txt \
  --images "/abs/path/pic1.jpg" "/abs/path/pic2.jpg"

# WSL/远程 CDP + Windows/UNC 路径:跳过本地文件预校验
python scripts/publish_pipeline.py --headless \
  --title-file /abs/path/title.txt \
  --content-file /abs/path/content.txt \
  --images "\\\\wsl.localhost\\Ubuntu\\home\\user\\pic1.jpg" \
  --skip-file-check
```

说明:当控制端在 WSL 运行,且传入 Windows/UNC 路径(如 `\\wsl.localhost\...`)时,可加 `--skip-file-check`,避免 Linux 侧 `os.path.isfile()` 误判不存在。
说明:脚本会自动识别 `C:\...`、`\\wsl.localhost\...` 等 Windows/UNC 路径,并在传给 `DOM.setFileInputFiles` 时保留原始路径形态。
说明:若需要强制保留原始路径,也可显式加 `--preserve-upload-paths`。

### 3.5) 视频发布(本地视频文件 / 视频 URL)

```bash
# 本地视频文件
python scripts/publish_pipeline.py --headless \
  --title-file /abs/path/title.txt \
  --content-file /abs/path/content.txt \
  --video "/abs/path/my_video.mp4"

# 视频 URL
python scripts/publish_pipeline.py --headless \
  --title-file /abs/path/title.txt \
  --content-file /abs/path/content.txt \
  --video-url "https://example.com/video.mp4"
```

### 4) 多账号发布 / 切换

```bash
python scripts/cdp_publish.py list-accounts
python scripts/cdp_publish.py add-account work --alias "工作号"
python scripts/cdp_publish.py --port 9223 --account work login
python scripts/publish_pipeline.py --port 9223 --account work --headless --title-file /abs/path/title.txt --content-file /abs/path/content.txt --image-urls "https://example.com/1.jpg"
```

### 5) 搜索内容 / 获取笔记详情

```bash
# 首页推荐笔记
python scripts/cdp_publish.py list-feeds

# 搜索笔记
python scripts/cdp_publish.py search-feeds --keyword "春招"

# 常见变体:带筛选 + 复用标签页
python scripts/cdp_publish.py --reuse-existing-tab search-feeds --keyword "春招" --sort-by 最新 --note-type 图文

# 获取笔记详情(feed_id 与 xsec_token 来自搜索结果)
python scripts/cdp_publish.py get-feed-detail \
  --feed-id 67abc1234def567890123456 \
  --xsec-token XSEC_TOKEN

# 可选:滚动加载更多一级评论,并尝试展开二级回复
python scripts/cdp_publish.py get-feed-detail \
  --feed-id 67abc1234def567890123456 \
  --xsec-token XSEC_TOKEN \
  --load-all-comments \
  --limit 20 \
  --click-more-replies \
  --reply-limit 10 \
  --scroll-speed normal
```

说明:`list-feeds` 返回首页推荐 feed 列表。
说明:`search-feeds` 输出中包含 `recommended_keywords_count` 与 `recommended_keywords`,表示回车前搜索框下拉推荐词。
说明:`search-feeds` 返回当前页面可提取到的结果,不提供单独的 `--limit` 条数控制;若只需前 N 条,请在调用方截断返回列表。
说明:`get-feed-detail --load-all-comments` 会先滚动评论区,并可选点击“更多回复”后再提取详情,同时额外返回 `comment_loading`。
说明:`check-login` 与主页登录检查默认启用本地缓存(12h,仅缓存“已登录”),到期后自动重新网页校验。

### 6) 给笔记发表评论(一级评论)

```bash
# 直接传评论文本
python scripts/cdp_publish.py post-comment-to-feed \
  --feed-id 67abc1234def567890123456 \
  --xsec-token XSEC_TOKEN \
  --content "写得很实用,感谢分享"

# 使用文件传评论(适合多行文本)
python scripts/cdp_publish.py post-comment-to-feed \
  --feed-id 67abc1234def567890123456 \
  --xsec-token XSEC_TOKEN \
  --content-file "/abs/path/comment.txt"
```

### 7) 获取内容数据表(content_data)

```bash
# 获取笔记基础信息表(曝光/观看/封面点击率/点赞/评论/收藏/涨粉/分享/人均观看时长/弹幕)
python scripts/cdp_publish.py content-data

# 下划线别名
python scripts/cdp_publish.py content_data

# 可选:导出 CSV
python 

讨论

提问、分享技巧或报告无法使用。按“有帮助”数量排序。

还没有帖子,欢迎第一个提问或分享。

此处内容由用户撰写,不代表 PopNx 团队。

登录后发帖

来自 GitHub

GitHub 星标
3,619
开发者
white0dew
许可证
MIT
最近代码更新
2026年11月18日
repo 中的 SKILL.md 文件(含译本和模板)
1