简介
一键提取小红书视频真实CDN地址并下载,支持无水印高清保存,适合内容创作者素材归档。
原始描述
Download videos from Xiaohongshu (小红书) pages. Use when the user wants to save or download a video from a xiaohongshu.com URL, or mentions "小红书视频下载", "保存小红书视频...
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
技能正文
name: xiaohongshu-downloader description: Download videos from Xiaohongshu (小红书) pages. Use when the user wants to save or download a video from a xiaohongshu.com URL, or mentions "小红书视频下载", "保存小红书视频", or similar requests.
Xiaohongshu Video Downloader
Download videos from Xiaohongshu (小红书) by extracting the real CDN URL from the page.
How It Works
Xiaohongshu videos use blob URLs in the browser, which cannot be downloaded directly. This skill:
- Uses browser automation to load the page (required for JS rendering)
- Extracts the real CDN video URL from the page HTML
- Downloads the video with proper headers
Method 1: Browser Automation (Recommended)
Use the browser tool to extract the video URL:
- Navigate to the Xiaohongshu page:
browser action=navigate targetUrl="https://www.xiaohongshu.com/explore/NOTE_ID"
- Extract the video URL with JavaScript:
(() => {
const html = document.documentElement.outerHTML;
const mp4Matches = html.match(/https?:\/\/[^"\s]+\.mp4[^"\s]*/g);
if (mp4Matches) return [...new Set(mp4Matches)];
return null;
})()
- Download with curl:
curl -L -o output.mp4 "<VIDEO_URL>" \
-H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36" \
-H "Referer: https://www.xiaohongshu.com/"
Method 2: Python Script
For pages that don't require authentication:
python3 scripts/download_video.py "https://www.xiaohongshu.com/explore/NOTE_ID"
Note: The Python script may not work for all pages due to:
- JavaScript rendering requirements
- Authentication/login requirements
- Rate limiting
Notes
- Videos are typically hosted on
xhscdn.comCDN - User-Agent and Referer headers are required to avoid 403 errors
- Output directory:
~/Downloads/xiaohongshu/ - Video URLs follow pattern:
https://sns-video-*.xhscdn.com/stream/.../*.mp4
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。