返回顶部
x

xiaohongshu-extract小红书信息提取

Extract metadata from Xiaohongshu (XHS) share or discovery URLs by parsing window.__INITIAL_STATE__ and returning note details. Use when asked to fetch XHS page content, note metadata, video info, or engagement stats from a public XHS link.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
1,725
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

xiaohongshu-extract

小红书提取工具

概述

使用内置脚本从小红书分享或发现链接中提取笔记元数据(标题、描述、类型、时间、用户、互动数据、标签、视频流信息)。

快速开始

运行提取器并将JSON输出到标准输出:

bash
python scripts/xiaohongshuextract.py url> --pretty

将JSON写入文件:

bash
python scripts/xiaohongshuextract.py url> --output /tmp/xhs_note.json

仅输出扁平化记录:

bash
python scripts/xiaohongshuextract.py url> --flat-only --pretty

仅将扁平化记录写入文件:

bash
python scripts/xiaohongshuextract.py url> --flat-only --output /tmp/xhs_flat.json

将错误信息以JSON格式输出:

bash
python scripts/xiaohongshuextract.py url> --error-json

将错误信息以JSON格式写入文件:

bash
python scripts/xiaohongshuextract.py url> --error-json --output /tmp/xhs_error.json

工作流程

  1. 1. 使用用户提供的URL运行scripts/xiaohongshuextract.py。
  2. 如果脚本未能找到window.INITIALSTATE,请用户提供直接发现链接。
  3. 使用JSON输出总结笔记元数据或供下游分析使用。

输出说明

脚本返回包含以下内容的JSON对象:

  • - noteid、title、desc、type、time、iplocation
  • user(昵称、用户ID、头像)
  • interact(点赞/收藏/评论/分享数,以及标准化后的*num值)
  • tags
  • video(视频ID、时长、宽度、高度、帧率、大小、流地址)
  • fieldmapping(嵌套到扁平字段名称映射)
  • flat(包含标准化计数和ISO时间戳的扁平化记录)

如果流列表为空,video字段可能为null或空。

如果设置了--flat-only,则仅输出flat。如果设置了--error-json,错误信息将以JSON格式输出,并在可用时包含finalurl和statuscode。

资源

scripts/

  • - scripts/xiaohongshu_extract.py 从小红书分享/发现链接中提取笔记元数据。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 xiaohongshu-extract-1776360383 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 xiaohongshu-extract-1776360383 技能

通过命令行安装

skillhub install xiaohongshu-extract-1776360383

下载

⬇ 下载 xiaohongshu-extract v1.0.0(免费)

文件大小: 5.36 KB | 发布时间: 2026-4-17 15:06

v1.0.0 最新 2026-4-17 15:06
- Initial release of xiaohongshu-extract.
- Extracts rich metadata from Xiaohongshu (XHS) share or discovery URLs, including note details, user info, engagement stats, tags, and video stream information.
- Provides flexible JSON output options, including flattened records and error reporting.
- Includes command-line script with multiple output modes for integration and downstream analysis.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large