xhs-web-note-capture

Extract logged-in Xiaohongshu posts into markdown files with OCR.

1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/eatbreads/.agents --skill xhs-web-note-capture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xhs-web-note-capture
Source: https://github.com/eatbreads/.agents/tree/main/skills/xhs-web-note-capture
Command: npx skills add https://github.com/eatbreads/.agents --skill xhs-web-note-capture

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Capture complete Xiaohongshu (小红书) note content that is only available from a real logged-in browser session, including hidden or image-heavy posts, and convert them into local markdown files with metadata and OCRed text so the full post can be archived, searched, or edited offline.

Core Features & Use Cases

  • Logged-in capture: Navigate from an authenticated author or search page to obtain durable pc_user URLs containing xsec_token and save the full HTML with cookies.
  • State parsing: Extract structured note data by parsing window.INITIAL_STATE to reliably read title, body, tags, imageList, and interactInfo.
  • Image handling and OCR: Download images from imageList, run OCR (supports a bundled macOS Vision OCR binary), and include raw OCR output alongside original image links.
  • Output: Produce one markdown file per post containing metadata, full正文, image links, and OCR text; useful for archiving private notes, research, and content migration.

Quick Start

Save the logged-in note page HTML with cookies, then run the extractor to convert the saved HTML into a markdown file in your chosen output directory.

Frequently Asked Questions about xhs-web-note-capture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract logged-in Xiaohongshu posts into markdown?

To extract logged-in Xiaohongshu posts into markdown, you save the authenticated note page HTML with cookies, then run the extractor to parse window.__INITIAL_STATE__ and generate one markdown file per post with metadata and images.

Can I capture hidden or image-heavy Xiaohongshu notes that require xsec_token?

Yes, you can capture hidden or image-heavy Xiaohongshu notes requiring xsec_token by navigating from an authenticated author or search page to obtain durable pc_user URLs, saving the full HTML with cookies for the extractor to parse.

Does Xiaohongshu note extraction support image OCR on macOS?

Yes, Xiaohongshu note extraction supports image OCR on macOS by utilizing a bundled macOS Vision OCR binary to transcribe downloaded images from the note's imageList, including the raw OCR output alongside original image links in the final markdown file.

How does parsing window.__INITIAL_STATE__ work for Xiaohongshu web scraping?

Parsing window.__INITIAL_STATE__ for Xiaohongshu web scraping works by extracting structured note data directly from the saved HTML to reliably read the title, body, tags, imageList, and interactInfo without triggering anti-bot blocks.

Do I need to save cookies to extract Xiaohongshu posts to local files?

Yes, you need to save cookies to extract Xiaohongshu posts to local files because the extractor relies on saved HTML from an authenticated browser session to access restricted content and preserve metadata for offline markdown archiving.