SkillsGrove
SkillsGrove/숏폼 영상 및 크리에이터/inclusionAI/AWorld/xhs-scraper

xhs-scraper

설치

$npx skills add https://github.com/inclusionAI/AWorld --skill xhs-scraper
$git clone --depth 1 https://github.com/inclusionAI/AWorld.git /tmp/AWorld && mkdir -p ~/.claude/skills && cp -r /tmp/AWorld/examples/skill_agent/skills/xhs-scraper ~/.claude/skills/xhs-scraper
이 Agent Skill을 설치해 주세요: https://github.com/inclusionAI/AWorld/tree/bef598fcfb60da988c2660cafcf0d45f0128e8bf/examples/skill_agent/skills/xhs-scraper — 먼저 SKILL.md와 스크립트를 읽고, 안전하다고 확인한 뒤에만 제 skills 폴더에 설치해 주세요.

요약

원문 설명 · MIT小红书搜索抓取 skill - 通过 agent-browser (CDP) 抓取小红书搜索结果,支持列表+详情、多格式输出。使用场景:按关键词抓取笔记列表与正文、生成 RSS/JSON/Markdown。
아래 SKILL.md는 inclusionAI/AWorld(커밋 bef598f)에서 MIT 라이선스에 따라 게시한 것입니다. 본문은 변경하지 않았으며, 파일 상단의 메타데이터만 생략하고 이미지는 링크로 표시하며 매우 긴 파일은 일부만 표시합니다. Copyright 2025 [Inclusion AI]. 라이선스: LICENSE. 지침 파일만 표시되며 스크립트 등은 원본 저장소를 참고하세요.

小红书抓取 (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 搜索关键词(必填) -
-p CDP 端口 9222
-n 列表页最大滚动次数 5
-d 进入详情页获取正文的条数(0=仅列表) 10
-o 输出文件路径 stdout
-f 格式:md | rss | json md

示例

./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
라이선스 전문 보기(MIT)
MIT License

Copyright (c) 2025 [Inclusion AI]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.