If you're shutting down your TikTok account or you simply want a copy of all the videos you've published, TikTok has a process where you can request your data and then download it. However, the process is a bit arduous (perhaps on purpose) as you have to first request the download, wait a few days, then make sure you download it before it expires. Then, once you've downloaded the file, you realize it only contains single-use links to download the actual videos. If you have a lot of videos, the process of downloading each can be very time-consuming.
I've written a simple Node.js script that automates the process. Here's how to use it:
- Make sure you have Node.js installed on your computer
- Go through the process with TikTok to request and download your data file (you can Google how to do this)
- Unzip the resulting data file from TikTok
- Download the
index.js
andpackage.json
files included in this gist and move them into a separate folder (eg. `~/Downloads/dow