返回 Skill 列表
extension
分类: 其它无需 API Key

Xiaohongshu Auto Publisher

使用 Playwright 自动将图片/视频内容发布到小红书(Little Red Book)。当需要向小红书发布内容时使用此技能。

person作者: wideblueskyhubclawhub

Xiaohongshu Publisher

This skill automates the process of posting content to Xiaohongshu (Little Red Book) using Playwright. It supports both image and video uploads, along with title and content (description) text.

Setup Instructions

  1. Install Dependencies:

    pip install playwright requests
    playwright install chromium
    
  2. Initial Login: Before you can post, you must perform a manual login once to save your session state. Run the login script:

    python .trae/skills/xhs-publisher/scripts/login.py
    

    This will open a browser window. Scan the QR code or log in using your preferred method. Once logged in, the script will save the session to state.json.

Usage

To post content, use the post.py script:

python .trae/skills/xhs-publisher/scripts/post.py \
  --title "Your Post Title" \
  --content "Your post description here. #tags" \
  --files "/path/to/image1.jpg" "/path/to/image2.png"

Arguments

  • --title: The title of the post.
  • --content: The description or caption for the post.
  • --files: One or more paths to the images or video files you want to upload.

Notes

  • The script uses a visible browser window by default (headless=False) to help you monitor the process and handle any unexpected popups or captchas.
  • Ensure your files are in supported formats (e.g., JPG, PNG, MP4).