xiaohongshu-note-fetcher
抓取并整理小红书笔记公开页面信息(标题、正文摘要、作者、发布时间、互动数据、标签、封面图等)为结构化 JSON 或 Markdown。用于“根据笔记链接提取内容”“批量收集笔记基础信息”“生成笔记摘要素材”等场景;当用户提供小红书笔记 URL、URL 列表或需要导出机器可读结果时触发。
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/2813223285/xiaohongshu-note-fetcher小红书笔记获取
极简规则
输入 TikHub API Key + 需求(关键词、页码) 即可抓取小红书搜索数据。
最小示例:
make tikhub-fetch \
KEYWORD="女性力量" \
TIKHUB_PAGE=2 \
TIKHUB_TOKEN="<YOUR_TIKHUB_KEY>" \
TIKHUB_ENDPOINT=web \
TIKHUB_AUTH_MODE=bearer
输出文件:
workspace/xiaohongshu-note-fetcher-skill-data/tikhub_search_page2.json
快速开始
- 收集输入来源:
- 单条链接:直接给 URL。
- 批量链接:准备一个文本文件,每行一个 URL。
- 若目标页面需登录态:提供 Cookie 字符串或 Cookie 文件。
- 运行脚本抓取(页面解析模式):
python3 scripts/fetch_xiaohongshu_notes.py \
--url "https://www.xiaohongshu.com/explore/<note_id>" \
--format both \
--output result.json
- 批量抓取示例:
python3 scripts/fetch_xiaohongshu_notes.py \
--url-file ./urls.txt \
--format json \
--output notes.json
- 运行 TikHub API 搜索(推荐用于关键词搜笔记):
python3 scripts/search_notes_tikhub.py \
--token "<YOUR_TIKHUB_TOKEN>" \
--keyword "女性主义" \
--page 1 \
--output search_page1.json
也可以使用 Makefile 一键调用(推荐长期使用):
make tikhub-fetch \
KEYWORD="美食" \
TIKHUB_TOKEN="<YOUR_TIKHUB_TOKEN>" \
TIKHUB_ENDPOINT=web \
TIKHUB_AUTH_MODE=bearer
若你不想每次手输 token,可把 token 放到文件(如 ./.tikhub_token):
make tikhub-fetch \
KEYWORD="美食" \
TIKHUB_TOKEN_FILE=./.tikhub_token \
TIKHUB_ENDPOINT=web \
TIKHUB_AUTH_MODE=bearer
- 使用其他服务商 API(通用适配):
python3 scripts/search_notes_generic.py \
--base-url "https://your-api.example.com/search_notes" \
--auth-mode bearer \
--auth-header Authorization \
--token "<YOUR_API_TOKEN>" \
--keyword "美食推荐" \
--page 1 \
--param sort_type=general \
--output generic_search.json
- 从 TikHub 响应生成文章列表(按点赞过滤):
python3 scripts/build_article_list_from_tikhub.py \
--input ./tikhub_search.json \
--min-likes 1000 \
--rank-by hot \
--md-output ./xhs_article_list.md \
--csv-output ./xhs_article_list.csv \
--json-output ./xhs_article_list.json \
--template-output ./xhs_publish_templates.md
- 自动翻页抓取并合并(直接调 TikHub):
python3 scripts/build_article_list_from_tikhub.py \
--token "<YOUR_TIKHUB_TOKEN>" \
--keyword "美食" \
--pages 5 \
--sort general \
--note-type _0 \
--min-likes 1000 \
--rank-by hot \
--top 50
- 交互式筛选与查看(会先问你筛选方式,含默认方案):
python3 scripts/interactive_filter_view.py \
--input ./tikhub_search.json
直接回车会采用默认方案:
- 点赞阈值:
1000 - 排序:
hot(综合热度) - 条数:
20 - 查看:
summary - 同时导出
md/csv
若你不想交互,直接用默认方案:
python3 scripts/interactive_filter_view.py \
--input ./tikhub_search.json \
--non-interactive
- 导图输出(保留):
python3 scripts/generate_wow_pack.py \
--input ./xhs_article_list.json \
--keyword 美食 \
--url-output ./xhs_topic_mindmap_url.txt
- 本机浏览器抓取(不走第三方 API,推荐):
node scripts/fetch_xiaohongshu_note_playwright.js \
--url "https://www.xiaohongshu.com/explore/<note_id>" \
--cookie-file ./cookie.txt \
--output note_browser.json \
--screenshot note_browser.png \
--html-out note_browser.html
若首次运行提示 playwright_not_installed,先安装:
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-2813223285-xiaohongshu-note-fetcher": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
personal-health-coach
Personal health coach for gym and daily reminders with weather-aware outfit suggestions.
meeting-notes-skill
会议纪要与会议播报生成技能。用于处理会议录音或转写文本,执行发言人区分、口语降噪、议题重构、双钻结构整理,并输出执行摘要、核心决议、Markdown待办表格、TTS播报稿和会议思维导图(HTML/SVG/XMind)。支持双向语音能力:录音转文本(ASR)与文本转录音(TTS)。用户提到“会议纪要”“录音转文字”“文字转语音”“action items”“会后总结”“决议整理”“语音简报/会议播客”“思维导图/脑图”时使用。
assistant-physician-clinical-exam-tutor
Assistant physician exam trainer focused on objective-choice drills, practical station simulation, scoring, and weak-point tracking. Use for daily exam-style practice only.