How Do I Download off Xiaohongshu?

Posted under General

1. Go to a page, like https://www.xiaohongshu.com/explore/635b4502000000001700f48d
2. Press F12, click on Sources, find "sns-webpic-qc.xhscdn.com" and drop down until you find the image
3. Right click on it and copy the file name, like "1000g0081gb9lfh0b40605ofl5of4117ogqcm2j8!nd_prv_wlteh_webp_3"
4. Paste it on your address bar and add "https://ci.xiaohongshu.com/" before the file name, then replace "!nd_prv_wlteh_webp_3" or "!nd_dft_wlteh_webp_3" or whatever is written there with "?imageView2/2/w/format/png".
5. You'll get something like https://ci.xiaohongshu.com/1000g0081gb9lfh0b40605ofl5of4117ogqcm2j8?imageView2/2/w/format/png (post #7253381).

The same can be done if you copy the link address of the image, just replace the address.

Sessyoin_Kiara said:

4. Paste it on your address bar and add "https://ci.xiaohongshu.com/" before the file name, then replace "!nd_prv_wlteh_webp_3" or "!nd_dft_wlteh_webp_3" or whatever is written there with "?imageView2/2/w/format/png".
5. You'll get something like https://ci.xiaohongshu.com/1000g0081gb9lfh0b40605ofl5of4117ogqcm2j8?imageView2/2/w/format/png (post #7253381).

This returns a lossy-lossless PNG conversion of https://ci.xiaohongshu.com/1000g0081gb9lfh0b40605ofl5of4117ogqcm2j8. I haven't checked if the URL without any extra parameters is better in all cases but it seems to be for this specific image.

Sessyoin_Kiara said:

1. Go to a page, like https://www.xiaohongshu.com/explore/635b4502000000001700f48d
2. Press F12, click on Sources, find "sns-webpic-qc.xhscdn.com" and drop down until you find the image
3. Right click on it and copy the file name, like "1000g0081gb9lfh0b40605ofl5of4117ogqcm2j8!nd_prv_wlteh_webp_3"
4. Paste it on your address bar and add "https://ci.xiaohongshu.com/" before the file name, then replace "!nd_prv_wlteh_webp_3" or "!nd_dft_wlteh_webp_3" or whatever is written there with "?imageView2/2/w/format/png".
5. You'll get something like https://ci.xiaohongshu.com/1000g0081gb9lfh0b40605ofl5of4117ogqcm2j8?imageView2/2/w/format/png (post #7253381).

The same can be done if you copy the link address of the image, just replace the address.

That DL Panda site seems to be doing the same thing, just in a bit more mobile-friendly way.

@Knowledge_Seeker Save the following code as a bookmarklet and run it on the video page:

javascript:(()=>{let o;try{let e=window.location.href.match(/\/explore\/([^?]+)/)[1];o=__INITIAL_STATE__.note.noteDetailMap[e].note.video.consumer.originVideoKey}catch(o){}prompt("Video URL:",o?"https://sns-video-bd.xhscdn.com/"+o:"Error: not found")})()

Has the method to download videos changed? It seems like this isn't working for me anymore, including when I use it on videos that I've previously uploaded using this exact code (though from the console because I hate bookmarklets).

I checked in with a few people about it. For now, the alternative seems to be using DLPanda's Xiaohongshu downloader. Normally you shouldn't ever be using downloader websites like this but an exception can be made if the site is serving you the actual CDN link, which this one does.

The code above currently doesn't work because Xiaohongshu seems to no longer expose the consumer table containing the originVideoKey. Clearly it's not gone if a site like the above can still grab it but I'm just not exactly sure where it is.

I figured I might be able to watch the network calls to get the video but it gives the wrong file. The resolution is still the expected original resolution (or so I hope) but just not the right file size so obviously not the best version available if you just pluck it from the network responses.

1