xiaohongshu-browser

Browse Xiaohongshu (小红书) and take screenshots of posts. Supports keyword search, post modal screenshots, and returns post links. Requires prior manual login.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "xiaohongshu-browser" with this command: npx skills add besty0121/xiaohongshu-browser

Xiaohongshu Browser / 小红书浏览器

用 Playwright 自动化浏览小红书,搜索关键词并截图帖子弹窗预览。

Automate Xiaohongshu browsing — search keywords and screenshot post modal previews.

前置要求 / Prerequisites

Python 3.x + Playwright

pip install playwright
playwright install chromium

使用步骤

第一步:首次登录(只需要做一次)

  1. 运行登录脚本,会弹出浏览器窗口:
python <skill_dir>/scripts/xhs_open.py
  1. 在弹出的浏览器里手动登录小红书(扫码或账号密码都行)

  2. 登录成功后,创建一个控制文件来保存登录状态:

# Windows (PowerShell):
Set-Content "$env:USERPROFILE\.openclaw\.close_browser" "CLOSE"

# Windows (CMD):
echo CLOSE > %USERPROFILE%\.openclaw\.close_browser

# Linux / macOS:
echo CLOSE > ~/.openclaw/.close_browser
  1. 看到终端输出 AUTH_SAVED 就说明登录状态保存好了

💡 登录状态保存在 ~/.openclaw/xhs_data,以后搜索时会自动使用,不需要重复登录。

第二步:搜索并截图

python <skill_dir>/scripts/xhs_search.py "关键词" 数量

参数说明:

  • 第一个参数:搜索关键词(默认:御姐
  • 第二个参数:截图几个帖子(默认:5

示例:

# 搜索"美食",截图前3个帖子
python <skill_dir>/scripts/xhs_search.py "美食" 3

# 搜索"穿搭",截图前10个
python <skill_dir>/scripts/xhs_search.py "穿搭" 10

# 不传参数,用默认值
python <skill_dir>/scripts/xhs_search.py

输出结果

截图保存在 <skill_dir>/output/ 目录,文件名格式:post_序号_时间戳.png

每张截图包含帖子弹窗预览(图文详情)。

常见问题

需要重新登录?

小红书的登录会过期,如果搜索时遇到登录弹窗,需要重新登录:

# 1. 删除旧的登录数据
# Windows:
Remove-Item -Recurse -Force "$env:USERPROFILE\.openclaw\xhs_data"
# Linux / macOS:
rm -rf ~/.openclaw/xhs_data

# 2. 重新运行登录脚本
python <skill_dir>/scripts/xhs_open.py

搜索没结果?

  • 小红书可能会限制频繁访问,等几分钟再试
  • 关键词不要太长,2-6个字最佳
  • 不要带 # 号,直接搜关键词

目录结构

xiaohongshu-browser/
├── SKILL.md              # 本说明文件
├── scripts/
│   ├── xhs_open.py       # 登录脚本(首次使用)
│   └── xhs_search.py     # 搜索+截图脚本
└── output/               # 截图输出目录

注意事项

  • 使用无头浏览器(headless),不会弹出窗口
  • 操作间有随机延迟,降低被检测风险
  • 频繁使用可能触发小红书的反爬机制
  • 帖子链接需要 xsec_token 才能直接访问(搜索结果中已包含)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

xiaohongshu-matrix-factory

小红书内容矩阵工厂 | 5分钟生成一周高质量内容,支持批量账号矩阵运营。输入行业/产品信息,AI自动完成:爆款选题 → 高质量文案 → 配图Prompt → 发布标签,全流程自动化。专为MCN机构、品牌运营者、想规模化运营小红书的个人设计。

Registry SourceRecently Updated
800Profile unavailable
General

小红书商业洞察与竞品分析助手

小红书运营全链路数据工具|支持关键词搜索/笔记详情查询/爆款挖掘/竞品分析/KOL筛选/趋势洞察,基于Node.js开发,可获取小红书图文/视频笔记的点赞/评论/收藏数据,用数据驱动小红书流量增长,告别盲目创作

Registry SourceRecently Updated
2140Profile unavailable
General

Simple Websearch

极简网络搜索技能 - 支持通用搜索 + 社交媒体搜索(小红书/知乎/微博)

Registry SourceRecently Updated
1650Profile unavailable
General

Xiaohongshu Writer

Create Xiaohongshu-style notes with viral titles, native emoji use, optimized hashtags, and proven content structures for reviews, tutorials, and experience...

Registry SourceRecently Updated
1410Profile unavailable
xiaohongshu-browser | V50.AI