<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: wangxiaolou</title>
    <description>The latest articles on DEV Community by wangxiaolou (@wangxiaolou).</description>
    <link>https://dev.to/wangxiaolou</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4090575%2F572c3856-bb17-4d56-b354-e9639f1a2b71.jpg</url>
      <title>DEV Community: wangxiaolou</title>
      <link>https://dev.to/wangxiaolou</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wangxiaolou"/>
    <language>en</language>
    <item>
      <title>How I Built a Free Watermark-Free Xiaohongshu (RedNote) Downloader — and What I Learned About Anti-Scraping</title>
      <dc:creator>wangxiaolou</dc:creator>
      <pubDate>Mon, 24 Aug 2026 08:38:10 +0000</pubDate>
      <link>https://dev.to/wangxiaolou/how-i-built-a-free-watermark-free-xiaohongshu-rednote-downloader-and-what-i-learned-about-47oa</link>
      <guid>https://dev.to/wangxiaolou/how-i-built-a-free-watermark-free-xiaohongshu-rednote-downloader-and-what-i-learned-about-47oa</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Xiaohongshu (also known as RED or RedNote) is China's fastest-growing lifestyle platform — 300M+ monthly active users sharing beauty tutorials, product reviews, and travel content. But if you've ever tried to save a video from it, you know the pain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Screen recording = terrible quality + watermark visible&lt;/li&gt;
&lt;li&gt;Third-party APKs = security nightmare&lt;/li&gt;
&lt;li&gt;Most "downloaders" online = sketchy ads, no preview, or straight-up broken&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I built &lt;a href="https://xiaohongshudownloader.com" rel="noopener noreferrer"&gt;xiaohongshudownloader.com&lt;/a&gt; to fix this: paste a share link → see a preview (title, author, thumbnail) → download the clean MP4 or original-quality image. No sign-up, no app install, works on any device.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Technical Challenges
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Resolving Share Links
&lt;/h3&gt;

&lt;p&gt;Xiaohongshu's share system generates short links (&lt;code&gt;xhslink.com/xxx&lt;/code&gt; or &lt;code&gt;xhslink.cn/xxx&lt;/code&gt;) that redirect to the actual note. But they come in multiple flavors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Short links (need redirect resolution)&lt;/li&gt;
&lt;li&gt;Full share text (title + emoji + URL — users paste the whole thing)&lt;/li&gt;
&lt;li&gt;Explore URLs with &lt;code&gt;xsec_token&lt;/code&gt; parameters&lt;/li&gt;
&lt;li&gt;International RedNote URLs (rednote.com)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My parser handles all four formats. The tricky part: &lt;code&gt;xsec_token&lt;/code&gt; expires, so cached tokens break. I had to implement fresh-token fetching with fallback logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Bypassing Watermarks
&lt;/h3&gt;

&lt;p&gt;Here's the insight most downloaders miss: Xiaohongshu's watermark isn't burned into the original file. It's applied at the CDN layer when served through certain endpoints. The original MP4 on the CDN source is clean.&lt;/p&gt;

&lt;p&gt;My approach: fetch the note's metadata → extract the direct CDN source URL → serve that to the user. No re-encoding, no quality loss, no watermark overlay.&lt;/p&gt;

&lt;p&gt;(This is also why some downloads DO have watermarks — if the note is private or the CDN endpoint requires the watermarked version, I can't bypass it. I'm honest about this on the site.)&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Anti-Scraping Countermeasures
&lt;/h3&gt;

&lt;p&gt;Xiaohongshu (understandably) doesn't want mass scraping. Their defenses include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Signature generation:&lt;/strong&gt; Each API request needs a valid signature (computed client-side, changes regularly)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate limiting per IP:&lt;/strong&gt; Too many requests = temporary blocks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cookie/session validation:&lt;/strong&gt; Requests without proper cookies get rejected&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Short-link expiration:&lt;/strong&gt; Tokens in URLs expire after a window&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My countermeasures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;24-hour response caching:&lt;/strong&gt; Once I resolve a note, I cache the result. Same link = instant response from cache, no repeat hitting their API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request throttling:&lt;/strong&gt; Per-IP rate limits on my end prevent abuse (and keep my IP pool healthy).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graceful degradation:&lt;/strong&gt; When a link fails (private note, expired token, timeout), I return a specific error message telling the user WHY it failed and how to fix it — instead of a generic "something went wrong."&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Multi-Format Support
&lt;/h3&gt;

&lt;p&gt;Videos are straightforward (MP4). But Xiaohongshu is heavily image-based:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Single photos:&lt;/strong&gt; WebP or JPG from the CDN&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Albums/carousels:&lt;/strong&gt; Multiple images in order, with a "download all as ZIP" option&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Photos:&lt;/strong&gt; Not supported (honestly disclosed — these require special handling)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also added batch mode: paste up to 8 links at once, get all results in parallel.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture (Simplified)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User pastes link
    ↓
[Link Parser] → detects format, resolves redirects
    ↓
[Cache Check] → hit? return cached result
    ↓ miss
[Metadata Fetcher] → signature, cookies, API call
    ↓
[Media Extractor] → CDN source URLs (video/images)
    ↓
[Preview Card] → title, author, thumbnail, format
    ↓
[Download] → direct CDN URL or proxied stream
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The whole thing is a single Next.js app. No database — just an in-memory + Redis cache layer. Total infra cost: under $20/month at current traffic (~15k visits/month).&lt;/p&gt;

&lt;h2&gt;
  
  
  What Surprised Me: The Indonesian Market
&lt;/h2&gt;

&lt;p&gt;I built this tool expecting Chinese diaspora and Chinese-language learners to be my audience. Wrong.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;63% of my traffic comes from Indonesia.&lt;/strong&gt; Indonesian creators and e-commerce resellers use Xiaohongshu as a product-sourcing and content-inspiration platform. They search in English and Indonesian for "download xiaohongshu video" — and found my tool.&lt;/p&gt;

&lt;p&gt;This is a live lesson in building for a global audience: you don't always get the users you design for. Sometimes the market finds you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;If you want to test it: &lt;a href="https://xiaohongshudownloader.com" rel="noopener noreferrer"&gt;xiaohongshudownloader.com&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Paste any public Xiaohongshu/RedNote share link&lt;/li&gt;
&lt;li&gt;Works for videos, photos, and albums&lt;/li&gt;
&lt;li&gt;Free, no sign-up, works on mobile&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Building in public. Follow my progress or ask technical questions — happy to share more details about the scraping architecture in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
