Xiaohongshu Auto-Publisher: CLI Tool for Automated Posts

XiaohongshuSkills: Automate Your Little Red Book Content Publishing

Revolutionize your Xiaohongshu workflow with this powerful open-source Python CLI tool. XiaohongshuSkills (formerly RedBookSkills) enables fully automated content publishing, data scraping, and account management on China's popular lifestyle platform, Little Red Book (Xiaohongshu/RED).

πŸš€ Core Features

  • Automated Publishing: Auto-fill titles, content, upload images from URLs/local files
  • Smart Topic Tags: Extracts #hashtags from content end and auto-adds them
  • Multi-Account Support: Manage multiple accounts with isolated cookies
  • Headless Mode: Run without browser windows using Chrome DevTools Protocol (CDP)
  • Remote Deployment: Connect to remote Chrome instances via --host/--port
  • Content Intelligence: Search notes, fetch details, post comments, scrape analytics

🎯 Quick Start Guide

1. Setup

pip install -r requirements.txt

2. First Login

python scripts/cdp_publish.py login
Scan QR code in the opened Chrome window.

3. Publish Content (Headless)

python scripts/publish_pipeline.py --headless \
  --title "Your Article Title" \
  --content "Your article content here\n\n#xiaohongshu #automation #python" \
  --image-urls "https://example.com/image1.jpg https://example.com/image2.jpg"

4. Preview Mode (Visual Check)

python scripts/publish_pipeline.py --preview --title "Title" --content "Content"

πŸ” Advanced Features

Multi-Account Management

# List accounts
python scripts/cdp_publish.py list-accounts

# Publish with specific account
python scripts/publish_pipeline.py --account myaccount --headless --title "Title"

Content Research & Scraping

# Search notes
python scripts/cdp_publish.py search-feeds --keyword "spring recruitment"

# Get analytics dashboard
python scripts/cdp_publish.py content-data --csv-file data.csv

# Post comments
python scripts/cdp_publish.py post-comment-to-feed --feed-id ID --content "Great post!"

πŸ›  Technical Highlights

  • Login State Caching: 12-hour local cache reduces repeated QR scans
  • Anti-Hotlink Protection: Auto-adds Referer headers for image downloads
  • WSL/Remote Path Support: --skip-file-check for cross-platform paths
  • Error-Resilient: Automatic login detection and tab reuse options

πŸ“Š Repository Stats

  • 1.2K Stars | 123 Forks | MIT License
  • Built for Python 3.10+ on Windows (Chrome required)

⚠️ Important Notes

  • For educational use only - Respect Xiaohongshu's Terms of Service
  • Cookies stored securely in Chrome profiles
  • Monitor selector changes if platform UI updates

Ready to automate your Xiaohongshu strategy? Clone the repo and start publishing at scale today! Perfect for content creators, marketers, and developers building social automation workflows.

GitHub Repo

Original Article: View Original

Share this article