TikTokDownloader
TikTok 发布/喜欢/合辑/直播/视频/图集/音乐;抖音发布/喜欢/收藏/收藏夹/视频/图集/实况/直播/音乐/合集/评论/账号/搜索/热榜数据采集工具/下载工具
TikTokDownloader is an open-source Python tool that bulk-downloads videos, photo albums, live stream recordings, and comment data from TikTok and Douyin, with Docker support and a web API mode.
TikTokDownloader (also called DouK-Downloader) is an open-source Python tool for downloading content from TikTok and its Chinese counterpart Douyin. The README is written primarily in Chinese, so this explanation draws on what can be understood from the structure, code examples, and the English portions available.
The tool covers a wide range of content types: videos, photo albums, live stream recordings, background music, and collections. It can download posts from a single account in bulk, grab content from a list of links all at once, collect liked or favorited items, and pull comment data from posts. It also supports fetching live stream addresses so that you can record ongoing broadcasts using a tool called ffmpeg (a widely used program for processing video and audio files).
Downloaded data can be saved in several formats: CSV (a spreadsheet-compatible file), XLSX (a Microsoft Excel file), or SQLite (a local database file). The tool tracks which files have already been downloaded and automatically skips them on future runs, so you do not end up with duplicates. It also supports resuming interrupted downloads.
There are three ways to run the tool: a terminal-based interactive mode for direct use, a web API mode that lets other programs send requests to it, and a Docker-based setup for those who want to run it in an isolated container environment. Docker is a system that packages software and its dependencies into a self-contained unit so it runs the same way regardless of the host machine.
The tool requires a browser cookie to access TikTok or Douyin, which is a small piece of authentication data your browser stores after you log in. The README explains how to extract and configure this cookie. The project runs on Python 3.12 or later and is available as a pre-built executable for Mac and Windows users who prefer not to set up a Python environment manually.
Where it fits
- Download all videos from a TikTok account in bulk for personal archiving or research
- Record a live TikTok stream by fetching the stream address and passing it to ffmpeg
- Export comment data from posts to a CSV or Excel file for sentiment analysis
- Run the tool as a web API so another application can trigger downloads programmatically