[GH-ISSUE #1025] Adding Support for xiaohongshu.com Website #11959

Closed
opened 2026-05-08 08:07:07 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @Springshen on GitHub (Dec 29, 2024).
Original GitHub issue: https://github.com/imputnet/cobalt/issues/1025

describe the feature you'd like to see

With a monthly visitation of 300 million in China, and the expectation of even more traffic in the future, support for this site is of great importance.

additional context

https://www.xiaohongshu.com/

Originally created by @Springshen on GitHub (Dec 29, 2024). Original GitHub issue: https://github.com/imputnet/cobalt/issues/1025 ### describe the feature you'd like to see With a monthly visitation of 300 million in China, and the expectation of even more traffic in the future, support for this site is of great importance. ### additional context https://www.xiaohongshu.com/
GiteaMirror added the service requestneed more info labels 2026-05-08 08:07:07 -05:00
Author
Owner
<!-- gh-comment-id:2564690968 --> @KwiatekMiki commented on GitHub (Dec 29, 2024): https://github.com/imputnet/cobalt/issues/new?assignees=&labels=service+request&projects=&template=service-request.yml&title=add+support+for+%5Bservice+name%5D
Author
Owner

@dumbmoron commented on GitHub (Dec 29, 2024):

@Springshen please add some example links

<!-- gh-comment-id:2564837177 --> @dumbmoron commented on GitHub (Dec 29, 2024): @Springshen please add some example links
Author
Owner

@dumbmoron commented on GitHub (Jan 15, 2025):

from #1055:

shortlink:
http://xhslink.com/a/HFNEzlEk7tP3

share button copies this, so if cobalt can detect the link from this thatd be cool ig:
88 Kimmich发布了一篇小红书笔记,快来看吧! 😆 uvdE5BDEqh0P51h 😆 http://xhslink.com/a/HFNEzlEk7tP3,复制本条信息,打开【小红书】App查看精彩内容!

note that share text link contains a , (not a ,), which social media like Discord parse into the link, and they know this, so they seem to split off everything after ,.
<!-- gh-comment-id:2593867849 --> @dumbmoron commented on GitHub (Jan 15, 2025): from #1055: > ### link samples > > ```shell > shortlink: > http://xhslink.com/a/HFNEzlEk7tP3 > > share button copies this, so if cobalt can detect the link from this thatd be cool ig: > 88 Kimmich发布了一篇小红书笔记,快来看吧! 😆 uvdE5BDEqh0P51h 😆 http://xhslink.com/a/HFNEzlEk7tP3,复制本条信息,打开【小红书】App查看精彩内容! > > note that share text link contains a , (not a ,), which social media like Discord parse into the link, and they know this, so they seem to split off everything after ,. > ```
Author
Owner

@tizu69 commented on GitHub (Jan 16, 2025):

I just now noticed og:video tag contains the full video link lol

<!-- gh-comment-id:2596314367 --> @tizu69 commented on GitHub (Jan 16, 2025): I just now noticed og:video tag contains the full video link lol
Author
Owner

@Podter commented on GitHub (Jan 19, 2025):

Once you fetch the HTML page from xiaohongshu.com, the data is stored in the window.__INITIAL_STATE__ object after page load, you can get everything you need.

  • window.__INITIAL_STATE__.note.noteDetailMap["note_id"].note.imageList is an image array for image notes
  • window.__INITIAL_STATE__.note.noteDetailMap["note_id"].note.video.media.stream is the video URLs for video notes

Here is how it look like for image notes:

window.INITIAL_STATE.note.noteDetailMap["note_id"].note.imageList object

And here is how it look like for video notes:

window.INITIAL_STATE.note.noteDetailMap["note_id"].note.video.media.stream object

You can try it on your browser console!

Reference: JoeanAmier/XHS-Downloader

<!-- gh-comment-id:2600755052 --> @Podter commented on GitHub (Jan 19, 2025): Once you fetch the HTML page from xiaohongshu.com, the data is stored in the `window.__INITIAL_STATE__` object after page load, you can get everything you need. - `window.__INITIAL_STATE__.note.noteDetailMap["note_id"].note.imageList` is an image array for image notes - `window.__INITIAL_STATE__.note.noteDetailMap["note_id"].note.video.media.stream` is the video URLs for video notes Here is how it look like for image notes: ![window.__INITIAL_STATE__.note.noteDetailMap["note_id"].note.imageList object](https://github.com/user-attachments/assets/1d6f8b8b-16d3-421d-9140-cdf372989634) And here is how it look like for video notes: ![window.__INITIAL_STATE__.note.noteDetailMap["note_id"].note.video.media.stream object](https://github.com/user-attachments/assets/613b9be4-2abe-4c6b-aee6-914aec93d169) You can try it on your browser console! Reference: [JoeanAmier/XHS-Downloader](https://github.com/JoeanAmier/XHS-Downloader)
Author
Owner

@lostdusty commented on GitHub (Jan 20, 2025):

thanks, will make a pr tomorrow (at my time)

<!-- gh-comment-id:2601159181 --> @lostdusty commented on GitHub (Jan 20, 2025): thanks, will make a pr tomorrow (at my time)
Author
Owner

@wukko commented on GitHub (Jan 21, 2025):

we added support for xiaohongshu in 10.6! it's already available on https://cobalt.tools, go try it!

<!-- gh-comment-id:2605024093 --> @wukko commented on GitHub (Jan 21, 2025): we added support for xiaohongshu in 10.6! it's already available on https://cobalt.tools, go try it!
Sign in to join this conversation.