<?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: tiktik</title>
    <description>The latest articles on DEV Community by tiktik (@tiktik).</description>
    <link>https://dev.to/tiktik</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%2F4236671%2F46997e12-1a08-4386-8091-715d19e198d7.png</url>
      <title>DEV Community: tiktik</title>
      <link>https://dev.to/tiktik</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tiktik"/>
    <language>en</language>
    <item>
      <title>What people actually paste into a TikTok downloader (and how to handle each one)</title>
      <dc:creator>tiktik</dc:creator>
      <pubDate>Mon, 23 Nov 2026 02:48:10 +0000</pubDate>
      <link>https://dev.to/tiktik/what-people-actually-paste-into-a-tiktok-downloader-and-how-to-handle-each-one-4plm</link>
      <guid>https://dev.to/tiktik/what-people-actually-paste-into-a-tiktok-downloader-and-how-to-handle-each-one-4plm</guid>
      <description>&lt;p&gt;When I built &lt;a href="https://tiktik.download" rel="noopener noreferrer"&gt;TikTik&lt;/a&gt;, a free web tool that saves public TikTok videos without the watermark, I assumed the input would be simple: a URL like &lt;code&gt;https://www.tiktok.com/@user/video/123&lt;/code&gt;. Real users proved me wrong quickly. Here is what actually lands in the input box, and what the backend has to do with each case.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. A whole sentence, not a link
&lt;/h2&gt;

&lt;p&gt;On Android, "Share → Copy link" sometimes copies text around the link, and people also paste from chats. So the first step happens in the browser: take the first &lt;code&gt;http(s)://&lt;/code&gt; run of characters and ignore the rest.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="o"&gt;?:&lt;/span&gt;\&lt;span class="o"&gt;/&lt;/span&gt;\&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;?:&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;?!&lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="o"&gt;?:&lt;/span&gt;\&lt;span class="o"&gt;/&lt;/span&gt;\&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;\&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;"'])+/i)?.[0] ?? "";
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The negative lookahead stops two links glued together without a space from turning into one.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Three kinds of short links
&lt;/h2&gt;

&lt;p&gt;Most mobile shares are short links: &lt;code&gt;vm.tiktok.com/XXXX&lt;/code&gt;, &lt;code&gt;vt.tiktok.com/XXXX&lt;/code&gt;, and from the web app, &lt;code&gt;www.tiktok.com/t/XXXX&lt;/code&gt;. None of them say whether the post is a video or a photo slideshow, so you have to follow the redirect before deciding how to parse.&lt;/p&gt;

&lt;p&gt;I first handled only the &lt;code&gt;vm.&lt;/code&gt; and &lt;code&gt;vt.&lt;/code&gt; hosts. The &lt;code&gt;/t/&lt;/code&gt; form slipped through to the video parser, which happened to work for videos and failed for slideshows. A real user hit it in production before I did.&lt;/p&gt;

&lt;p&gt;Short links also expire. An expired one doesn't return a 404. It redirects to the TikTok home page. So the rule is: if the resolved URL has no &lt;code&gt;/@user/&lt;/code&gt; in it, tell the user to copy the link again instead of showing a generic error.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Tracking parameters everywhere
&lt;/h2&gt;

&lt;p&gt;A typical shared link looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://www.tiktok.com/@someone/video/7xxxxxxxxxxxxxxxxxx?_r=1&amp;amp;_t=ZM-xxxx&amp;amp;is_from_webapp=1&amp;amp;sharer_language=es&amp;amp;share_enter_from=general_search
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything after &lt;code&gt;?&lt;/code&gt; is about the sharer, not the post. I reduce every post URL to &lt;code&gt;https://www.tiktok.com/@user/(video|photo)/&amp;lt;id&amp;gt;&lt;/code&gt;, so the same post always maps to one key for logs and caching.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Links wrapped by Google
&lt;/h2&gt;

&lt;p&gt;People who find a TikTok in the Google app and tap Share get a Google link, not a TikTok link: &lt;code&gt;google.com/url?q=...&lt;/code&gt;, &lt;code&gt;/goto?url=...&lt;/code&gt;, or &lt;code&gt;share.google/...&lt;/code&gt;. The first two carry the target in the query string. &lt;code&gt;share.google&lt;/code&gt; needs one request without following redirects to read the &lt;code&gt;Location&lt;/code&gt; header. I unwrap up to a few hops, cache the result, and only then check that the final host is really &lt;code&gt;tiktok.com&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Photo posts that look like videos
&lt;/h2&gt;

&lt;p&gt;Slideshows open like videos in the app, but they are a list of images plus one music track. Their URLs use &lt;code&gt;/photo/&lt;/code&gt; instead of &lt;code&gt;/video/&lt;/code&gt;, which is the only reliable way to tell before parsing. They need a different code path: list each image, offer them one by one or as a numbered ZIP, and give the music its own button.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Pages that are not a post
&lt;/h2&gt;

&lt;p&gt;Profile pages (&lt;code&gt;/@user&lt;/code&gt;), sound pages (&lt;code&gt;/music/...&lt;/code&gt;), hashtags, search and discover pages all get pasted. A sound page is the interesting one: people want "the song", but the page is a list of videos. Instead of passing these to the parser and returning a stack trace, I match them up front and answer with something actionable: paste the link of a video that uses this sound.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Posts that exist but aren't available
&lt;/h2&gt;

&lt;p&gt;Deleted posts, private accounts and videos limited to some regions all come back as errors from the parser, with messages users can't act on. I map them to one plain sentence: the content may be deleted, private or not available in our server's region. When it's a region issue, retrying from another region first is worth it before giving up.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;The download itself was the easy part. Most of the work was turning messy input into either one clean post URL or one clear sentence the user can act on. Most of the cases above showed up in real usage before I thought of them. If you build anything that accepts links from mobile users, log the raw input (without personal data) from day one.&lt;/p&gt;

&lt;p&gt;Stack, for the curious: Python and FastAPI with &lt;a href="https://github.com/yt-dlp/yt-dlp" rel="noopener noreferrer"&gt;yt-dlp&lt;/a&gt; for public posts, Nuxt with server-side rendering for the pages. Only public posts can be downloaded, and nothing is stored after the download.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I'm the developer of TikTik.&lt;/em&gt; If you have seen other strange link formats, I'd like to hear about them in the comments.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>python</category>
      <category>showdev</category>
      <category>tiktok</category>
    </item>
    <item>
      <title>What I learned about TikTok's hidden video copies while building a downloader</title>
      <dc:creator>tiktik</dc:creator>
      <pubDate>Tue, 10 Nov 2026 09:11:57 +0000</pubDate>
      <link>https://dev.to/tiktik/what-i-learned-about-tiktoks-hidden-video-copies-while-building-a-downloader-53f2</link>
      <guid>https://dev.to/tiktik/what-i-learned-about-tiktoks-hidden-video-copies-while-building-a-downloader-53f2</guid>
      <description>&lt;p&gt;I recently launched &lt;a href="https://tiktik.download" rel="noopener noreferrer"&gt;TikTik&lt;/a&gt;, a small web tool that saves public TikTok videos without the watermark, photo slideshows as the original images, and audio as MP3. Building it taught me a few things about how TikTok serves media that I didn't expect.&lt;/p&gt;

&lt;h2&gt;
  
  
  One video, several files
&lt;/h2&gt;

&lt;p&gt;When you upload a video, TikTok doesn't keep just one file. It keeps several copies at the &lt;strong&gt;same resolution&lt;/strong&gt; but different bitrates, so it can stream a light copy on a weak connection.&lt;/p&gt;

&lt;p&gt;For one 27-second sample, the copies were:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Copy&lt;/th&gt;
&lt;th&gt;Bitrate&lt;/th&gt;
&lt;th&gt;Size&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Smallest&lt;/td&gt;
&lt;td&gt;293 kbps&lt;/td&gt;
&lt;td&gt;1.0 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Middle&lt;/td&gt;
&lt;td&gt;422 kbps&lt;/td&gt;
&lt;td&gt;1.4 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best&lt;/td&gt;
&lt;td&gt;800 kbps&lt;/td&gt;
&lt;td&gt;2.7 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Many download tools return whichever copy comes first. That explains a very common complaint: "my TikTok download looks blurry". The resolution is fine; the bitrate isn't. In TikTik I group the options by codec and resolution and label them &lt;em&gt;best quality&lt;/em&gt;, &lt;em&gt;smaller file&lt;/em&gt; and &lt;em&gt;smallest file&lt;/em&gt;, so people can pick on purpose. I wrote up the user-facing side of this here: &lt;a href="https://tiktik.download/solutions/tiktok-video-blurry-after-download" rel="noopener noreferrer"&gt;why TikTok downloads look blurry&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  H.264 vs H.265
&lt;/h2&gt;

&lt;p&gt;Some copies are H.265 (HEVC). They're smaller at the same quality, but plenty of Windows PCs can't play them without the paid HEVC extension, and some video editors won't import them. So H.264 is always listed first, even when H.265 is smaller.&lt;/p&gt;

&lt;h2&gt;
  
  
  Photo posts aren't videos
&lt;/h2&gt;

&lt;p&gt;TikTok slideshows look like videos in the app, but under the hood they're a list of separate images plus a music track. Treating them as video gives you a low-quality screen-recording-like result. Instead, TikTik lists each image, saves them as JPG one by one or as a ZIP numbered in order, and offers the music separately (&lt;a href="https://tiktik.download/solutions/how-to-save-tiktok-slideshow-photos" rel="noopener noreferrer"&gt;guide&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; Python, FastAPI, and &lt;a href="https://github.com/yt-dlp/yt-dlp" rel="noopener noreferrer"&gt;yt-dlp&lt;/a&gt; for reading public posts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Nuxt with server-side rendering (pages need to be readable by search engines without JavaScript)&lt;/li&gt;
&lt;li&gt;Video files are relayed, not stored. Nothing is kept after the download.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Things I'd do differently
&lt;/h2&gt;

&lt;p&gt;I underestimated how much of the work is not the download itself but &lt;strong&gt;explaining choices&lt;/strong&gt; to users: which file to pick, where the file went on an iPhone (the Files app, not Photos), and why some videos can't be downloaded at all (private accounts). Writing short guides for those questions turned out to be as useful as the tool.&lt;/p&gt;

&lt;p&gt;Only public posts can be downloaded, and I ask users to save only content they own or have permission to use.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I'm the developer of TikTik.&lt;/em&gt; Feedback welcome!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>python</category>
      <category>showdev</category>
      <category>tiktok</category>
    </item>
  </channel>
</rss>
