Skip to content

feat(xiaohongshu/note): add video URL extraction - #58

Open
easman wants to merge 1 commit into
epiral:mainfrom
easman:feat/xiaohongshu-video-urls
Open

feat(xiaohongshu/note): add video URL extraction#58
easman wants to merge 1 commit into
epiral:mainfrom
easman:feat/xiaohongshu-video-urls

Conversation

@easman

@easman easman commented Apr 7, 2026

Copy link
Copy Markdown

Summary

Enhance the xiaohongshu/note adapter to expose video download URLs for video notes.

Changes

  • Add `extractVideoInfo()` helper function to parse video stream data
  • Extract H.264 and H.265 format variants with quality/resolution info
  • Include direct download URLs (`masterUrl`) for each format
  • Return video metadata: duration, width, height, file size

Usage

For video notes, the response now includes a `video` field:

```json
{
"video": {
"has_video": true,
"duration": 58.5,
"width": 720,
"height": 1280,
"formats": [
{
"quality": "h264",
"resolution": "720x1280",
"url": "http://sns-video-bd.xhscdn.com/.../xxx.mp4",
"size": 171234567,
"duration": 58.5
}
]
}
}
```

For image notes, `video` is `null`.

Testing

Tested with both video and image notes to ensure backward compatibility.

Extract video stream URLs from video notes and expose them
in the response for downstream download tools.

- Add extractVideoInfo() helper to parse h264/h265 stream data
- Return video metadata: duration, resolution, format variants
- Include direct download URLs (masterUrl) for each quality

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant