Skip to content

feat: add Xiaohongshu video (mp4) publishing support #27

Description

@mylukin

Context

opencli xiaohongshu publish currently only supports image notes (图文笔记). When a .mp4 file is passed via --images, the adapter rejects it with a format validation error. There is no video publishing path for Xiaohongshu.

Actual Result

Command failed with exit code 1: opencli xiaohongshu publish '...' --images /tmp/.../video.mp4 --format json
error:
  code: UNKNOWN
  message: 'Unsupported image format ".mp4". Supported: jpg, png, gif, webp'

Expected Result

A video publishing path that accepts .mp4 files and uploads them via the Xiaohongshu Creator Center video upload flow, similar to how YouTube and TikTok adapters handle video.

Proposal

Add a xiaohongshu video publish sub-command (or --video flag on the existing publish command) that:

  • Accepts a single .mp4 file as input
  • Navigates the Creator Center video upload page via browser automation
  • Supports --title, --privacy, and --format json flags consistent with other adapters

Acceptance Criteria

  • opencli xiaohongshu publish video.mp4 --title "..." succeeds and returns JSON result
  • Unsupported formats still return a clear error
  • Existing image note publish flow is unaffected
  • Unit tests cover the new video publish path

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions