OpenParable
Skip to content
← Back to skills

Xhs Scraper

Research
xhs-scraper

Xhs Scraper is an Agent Skill for research published in the inclusionAI/AWorld repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

小红书搜索抓取 skill - 通过 agent-browser (CDP) 抓取小红书搜索结果,支持列表+详情、多格式输出。使用场景:按关键词抓取笔记列表与正文、生成 RSS/JSON/Markdown。

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/inclusionAI/AWorld/blob/HEAD/examples/skill_agent/skills/xhs-scraper/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/xhs-scraper, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

小红书抓取 (xhs-scraper)

概述

通过已连接 CDP 的浏览器(agent-browser)抓取小红书搜索结果:列表页滚动采集卡片信息,可选进入详情页获取正文,输出为 Markdown / RSS / JSON。

工具路径

  • 脚本:.claude/skills/xhs-scraper/scrape_xhs.sh
  • 依赖:agent-browser(CDP 已连接)、python3

用法

./scrape_xhs.sh -k <keyword> [-p <cdp_port>] [-n <max_scrolls>] [-d <detail_count>] [-o <output_file>] [-f <format>]

参数

参数说明默认
-k搜索关键词(必填)-
-pCDP 端口9222
-n列表页最大滚动次数5
-d进入详情页获取正文的条数(0=仅列表)10
-o输出文件路径stdout
-f格式:md | rss | jsonmd

示例

./scrape_xhs.sh -k "Agent开发工程师"
./scrape_xhs.sh -k "AI Agent岗位" -d 5 -f rss -o feed.xml
./scrape_xhs.sh -k "大模型面经" -n 10 -d 20 -f json -o data.json