XiaohongshuSkills  by white0dew

Automated Xiaohongshu (RED) posting and content management CLI

Created 1 month ago
1,867 stars

Top 22.9% on SourcePulse

GitHubView on GitHub
Project Summary

<2-3 sentences summarising what the project addresses and solves, the target audience, and the benefit.> This project offers a command-line tool for automating Xiaohongshu (RED) platform interactions, including content publishing, commenting, and data retrieval. It is designed for users needing to manage multiple accounts or streamline content workflows, providing programmatic control via the Chrome DevTools Protocol (CDP).

How It Works

The tool utilizes the Chrome DevTools Protocol (CDP) to automate browser actions, enabling headless operation, multi-account management with isolated cookies, and direct control over publishing workflows. It simulates user input for titles, content, image uploads, and hashtag insertion. Additionally, it supports fetching note details, comments, search results, and content performance data.

Quick Start & Requirements

  • Installation: Clone the repository and execute pip install -r requirements.txt.
  • Prerequisites: Python 3.10+, Google Chrome browser, and Windows OS (currently tested on Windows).
  • Initial Login: Run python scripts/cdp_publish.py login to open a Chrome instance for QR code scanning and authentication.
  • Documentation: Comprehensive command-line examples are provided for all functionalities.

Highlighted Details

  • Automated Publishing: Supports filling titles, content, uploading images, and automatically appending hashtags identified from the content's last line.
  • Multi-Account Management: Allows management of multiple Xiaohongshu accounts with distinct, isolated cookie storage.
  • Headless & Remote CDP: Enables background execution without a visible browser window and connection to remote Chrome debugging ports.
  • Content & Data Retrieval: Features include searching notes, fetching detailed note information (including comments), and scraping content performance metrics into CSV format.
  • Login State Management: Includes automatic login detection, local state caching (12 hours), and account switching capabilities.

Maintenance & Community

Contact information includes a WeChat ID (whitedewstory) and a Knowledge Planet for usage tips. The project's roadmap indicates that core features like publishing, multi-account support, note retrieval, auto-commenting, and material search have been implemented.

Licensing & Compatibility

The project is distributed under the MIT License. This permissive license generally permits commercial use and integration into closed-source applications, requiring only attribution.

Limitations & Caveats

This tool is intended strictly for educational and research purposes; users must comply with Xiaohongshu's platform regulations. Current testing is limited to the Windows operating system. Website structure changes by Xiaohongshu may necessitate updates to the tool's selectors, potentially breaking functionality. User cookies are stored locally and require secure handling.

Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
4
Issues (30d)
4
Star History
1,848 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.