XHS Comment Scraper for Openclaw

An automated browser-based tool for scraping Xiaohongshu note comments and generating visual analysis reports.

liteli1987gmail
v1.0.0
Mar 24, 2026
2
835
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install xhs-comment

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install xhs-comment using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is XHS Comment Scraper?

The XHS Comment Scraper is a robust solution designed to automate the collection of user feedback and community engagement data from Xiaohongshu. By processing blogger profile links, this Openclaw Skills automation navigates through individual notes to capture full comment threads, including nested replies that are typically hidden behind click-to-expand triggers.

This skill overcomes common web scraping hurdles such as dynamic Vue.js rendering and anti-crawling measures by utilizing direct text stream parsing and dedicated browser profiles. It transforms raw social media interactions into structured JSON data and comprehensive visual reports, making it an essential tool for market researchers and content creators.

XHS Comment Scraper Use Cases

  • Automating the collection of audience feedback from a specific blogger's entire feed.
  • Performing sentiment analysis and keyword extraction on trending Xiaohongshu notes.
  • Generating competitive intelligence reports for brand monitoring on social commerce platforms.
  • Archiving historical comment data for community management and engagement tracking.

How XHS Comment Scraper Works

  1. The user provides a Xiaohongshu blogger profile URL in the chat interface.
  2. The skill initializes a browser instance using a dedicated Openclaw profile to ensure stable authentication.
  3. It extracts all note links from the profile page using JavaScript to parse the document structure.
  4. For each note, the scraper simulates a click, waits for content to load, and expands all hidden reply chains.
  5. It captures the entire page content via the innerText API to bypass complex dynamic DOM rendering issues.
  6. The extracted text is parsed into structured data and saved as individual JSON files.
  7. Finally, a Python-based analysis suite processes the JSON files to generate word clouds and HTML visual reports.

XHS Comment Scraper Setup

Ensure you have Python 3 installed with the necessary visualization libraries. This skill requires the Openclaw browser tool configured with a specific profile.

# Install required Python libraries
pip install jieba matplotlib wordcloud

# Note: Use the dedicated profile for stability
# Command format for Openclaw Skills
browser(action="start", profile="openclaw")

Users must manually log in via QR code in the popped-up Chrome window once to establish the session.

XHS Comment Scraper Data Schema & Taxonomy

Each scraped note generates a JSON file following the naming convention: xhs_comments_{blogger}_{note_id}_{timestamp}.json. The data is organized as follows:

Field Description
blogger Object containing blogger name and profile URL
note Object containing note ID, title, and detail URL
comments Array of objects (author, content, time string, likes count)
scraped_at ISO 8601 timestamp of the scraping event
total_comments Integer count of all extracted comments

Files are saved to C:\Users\Downloads\xhs_comments\ by default.

XHS Comment Scraper Advanced Features

  • Multi-stage captcha handling that pauses for manual user intervention to prevent account flagging.
  • Automated nested reply expansion using recursive JavaScript click simulations.
  • Visual report generation including word clouds and comparative HTML dashboards.
  • Robust encoding management specifically optimized for Chinese character sets using UTF-8 explicitly.
  • Error-tolerant navigation that uses browser history and retries for high-reliability data collection.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*