🔥 TikTok Posts/Liked/Mix/Live/Video/Image/Music; DouYin Posts/Liked/Favorites/Collections/Video/Image/LivePhoto/Live/Music/Mix/Comments/Account/Search/Hot Board Data Acquisition Tools: Fully open-source, free data collection and file download tool based on HTTPX module implementation; batch download of DouYin account posts works, liked works, favorites works and collections works; batch download of TikTok account posts works and liked works; download of DouYin linked or TikTok linked works; obtain DouYin live stream addresses; download DouYin live stream video; obtain TikTok live stream addresses; download TikTok live stream video; collect DouYin works comments data; batch download of DouYin Mix works; batch download of TikTok Mix works; collect detailed data of DouYin accounts; collect DouYin user/works/live search results; collect DouYin Hot Board data.
⭐ Previous project names: TikTokDownloader
⭐ Due to the author's limited energy, I was unable to update the English document in a timely manner, and the content may have become outdated, partial translation is machine translation, the translation result may be incorrect, Suggest referring to Chinese documentation. If you want to contribute to translation, we warmly welcome you.
Function List (Click to Expand)
- ✅ Download DouYin video/image without watermarks
- ✅ Download DouYin live photo without watermarks
- ✅ Download the highest quality video file
- ✅ Download TikTok video source files
- ✅ Download TikTok video/image without watermarks
- ✅ Download of DouYin account posts/liked/favorites works
- ✅ Download of TikTok account posts/liked works
- ✅ Collect detailed data from DouYin/TikTok
- ✅ Batch download of linked works
- ✅ Batch download of works from multiple accounts
- ✅ Automatically skip already downloaded files
- ✅ Persistently save collected data
- ✅ Support CSV/XLSX/SQLite format for saving data
- ✅ Download dynamic/static cover images
- ✅ Obtain DouYin live stream addresses
- ✅ Obtain TikTok live stream addresses
- ✅ Use ffmpeg to download live video
- ✅ Web UI interaction interface
- ✅ Collect comments data from DouYin works
- ✅ Batch download of DouYin Mix works
- ✅ Batch download of TikTok Mix works
- ✅ Record statistics such as likes and favorites
- ✅ Filter works based on publication time
- ✅ Support incremental downloading of account works
- ✅ Support data Collections using proxies
- ✅ Support remote access via LAN
- ✅ Collect detailed data from DouYin accounts
- ✅ Update statistics of works
- ✅ Support custom account/mix mark
- ✅ Automatically update account nickname/mark
- ✅ Deploy to private servers
- ✅ Deploy to public servers
- ✅ Collect DouYin search data
- ✅ Collect DouYin hot board data
- ✅ Record IDs of already downloaded works
- ☑️
Scan QR code to log in and obtain Cookies
- ✅ Obtain Cookies from browsers
- ✅ Support Web API calls
- ✅ Support multithreaded downloading of works
- ✅ File integrity processing mechanism
- ✅ Custom rules for filtering works
- ✅ Archive and save works files by folder
- ✅ Customize file size limit
- ✅ Support resume downloading of files from breakpoints
- ✅ Monitor clipboard links to download works
Watch Demo on Bilibili; Watch Demo on YouTube
Terminal interaction mode
It is recommended to manage accounts through configuration files. For more information, please refer to the documentation



The project code has been refactored; the code for this mode has not yet been updated. It will be reopened after
future development is completed!


After starting this mode, Open http://127.0.0.1:5555/docs or http://127.0.0.1:5555/redoc to access the automatically
generated documentation!
from httpx import post
from rich import print
def demo():
headers = {"token": ""}
data = {
"detail_id": "0123456789",
"pages": 2,
}
api = "http://127.0.0.1:5555/douyin/comment"
response = post(api, json=data, headers=headers)
print(response.json())
demo()
⭐ Mac OS and Windows 10 and above users can go to Releases or Actions to download the compiled program, ready to use!
⭐ This project includes GitHub Actions for automatic building executable files. Users can use GitHub Actions to build the latest source code into executable files at any time!
⭐ For the automatic building executable files tutorial, please refer to the Build of Executable File Guide
section of this document. If you need a more detailed step-by-step tutorial with illustrations, please check out this article!
Note: The executable file main
on Mac OS may need to be started from the terminal command line. Due to device limitations, the executable file on the Mac OS platform has not been tested, and its usability cannot be guaranteed!
-
Run the executable file or configure the environment to run
Run the executable file
- Download the executable file compressed file built by Releases or Actions.
- After extracting, open the program folder and double-click to run
main
.
Configure the environment to run
- Install Python interpreter version
3.12
- Download the latest source code or the source code published on Releases to your local machine.
- Run the command
python -m venv venv
to create a virtual environment (optional).
- Run the command
.\venv\Scripts\activate.ps1
or venv\Scripts\activate
to activate the virtual environment (optional).
- Run the command
pip install -r requirements.txt
to install the required modules for the program.
- Run the command
python .\main.py
or python main.py
to start DouK-Downloader.
- Read the disclaimer of DouK-Downloader and enter content according to the prompt.
- Write Cookie Information into Configuration File
Read Cookie from Clipboard
- Refer to the Cookie Extraction Tutorial, copy the required Cookie to the clipboard
- Select the
Read Cookie from Clipboard
option, the program will automatically read the Cookie from the clipboard and write it into the configuration file
Read Cookie from Browser
- Select the
Read Cookie from Browser
option, then follow the prompts to input the browser type or its corresponding number
Obtain Cookie via QR Code Login (No longer valid)
Select the Obtain Cookie via QR Code Login
option, the program will display a login QR code image and open it with the default application
Use the TikTok app to scan the QR code and log in
Follow the prompts, the program will automatically write the Cookie into the configuration file
- Return to the program interface, sequentially select
Terminal interactive mode
-> Batch download link works (general)
-> Manually enter the link of the works to be collected
.
- Input the DouYin works link to download the works file (the TikTok platform requires more initial setup, please refer to the documentation for details).
- For more detailed instructions, please see Project Documentation.
⭐ It is recommended to use Windows Terminal (the default terminal that comes with Windows 11).
- Get the image
- Method 1: Build the image using the
Dockerfile
.
- Method 2: Pull the image using the command
docker pull joeanamier/tiktok-downloader
.
- Method 3: Pull the image using the command
docker pull ghcr.io/joeanamier/tiktok-downloader
.
- Create the container:
docker run --name ContainerName(optional) -p HostPort:5555 -v tiktok_downloader_volume:/app/Volume -it <image name>
.
Note: The <image name>
here must be consistent with the image name you used in the first step (joeanamier/tiktok-downloader
or ghcr.io/joeanamier/tiktok-downloader
)
- Run the container
- Start the container:
docker start -i container name/container ID
.
- Restart the container:
docker restart -i container name/container ID
.
Docker containers cannot directly access the host machine's file system, and some features may be unavailable, for example: Get Cookie from Browser
; if there are any other issues, please report!
Click to view Cookie tutorial
-
Cookie only needs to be re-written to the configuration file after it expires, and not every time the program is
run.
-
The Cookie can affect the resolution of the video files downloaded from the DouYin platform. If you are unable to
download high-resolution video files, please try updating the Cookie!
-
When the program fails to obtain data, you can try updating the Cookie or using a Cookie that is already logged in!
- When the program prompts the user for input, pressing Enter directly will return to the previous menu, and inputting
Q
or q
will end the program's execution.
- Since fetching data for liked and favorites works of an account only returns the publication dates of those works, not the dates of the actions (liking or favouring), the program needs to retrieve all liked and favorites works data before performing date filtering. If there are a large number of works, this may take a considerable amount of time. The number of requests can be controlled via the
max_pages
parameter.
- To obtain data for posts made by a private account, a logged-in Cookie is required, and the logged-in account must follow the private account.
- When batch downloading account posts works or mix works, if the corresponding nickname or mark parameter changes, the program will automatically update the nickname and mark parameter in the file names of the downloaded works.
- When downloading files, the program first downloads them to a temporary folder and then moves them to the storage folder upon completion. The temporary folder will be emptied when the program ends.
- The
Batch Download Favorites Works Mode
currently only supports downloading Favorites works for the account corresponding to the currently logged-in Cookie and does not support multiple accounts.
- If you want the program to use a proxy to request data, you must set the
proxy
parameter in settings.json
; otherwise, the program will not use a proxy.
- If your computer does not have a suitable program for editing JSON files, we recommend using the JSON Online Tool to edit the configuration file content.
- When the program prompts the user to input content or links, please be careful to avoid including newline characters, as this may cause unexpected issues.
- This project does not support downloading paid works. Please do not report any issues related to downloading paid works.
- On Windows systems, the program needs to be run as an administrator to read Cookies from Chromium, Chrome, and Edge browsers.
- This project has not been optimized for running multiple instances of the program. If you need to run multiple instances, please copy the entire project folder to avoid unexpected issues.
- During program execution, if you need to terminate the program or
ffmpeg
, please press Ctrl + C
to stop the process. Do not click the close button on the terminal window directly.
Build of Executable File Guide
Build of Executable File Guide (Click to Expand)
This guide will walk you through forking this repository and executing GitHub Actions to automatically build and package
the program based on the latest source code!
- Click the Fork button at the top right of the project repository to fork it to your personal GitHub account
- Your forked repository address will look like this:
https://github.com/your-username/this-repo
- Go to the page of your forked repository
- Click the Settings tab at the top
- Click the Actions tab on the right
- Click the General option
- Under Actions permissions, select Allow all actions and reusable workflows and click the Save button
3. Manually Trigger the Build Process
- In your forked repository, click the Actions tab at the top
- Find the workflow named 构建可执行文件
- Click the Run workflow button on the right:
- Select the master or develop branch
- Click Run workflow
4. Check the Build Progress
- On the Actions page, you can see the execution records of the triggered workflow
- Click on the run record to view detailed logs to check the build progress and status
5. Download the Build Result
- Once the build is complete, go to the corresponding run record page
- In the Artifacts section at the bottom of the page, you will see the built result file
- Click to download and save it to your local machine to get the built program
-
Resource Usage:
- GitHub provides free build environments for Actions, with a monthly usage limit (2000 minutes) for free-tier
users
-
Code Modifications:
- You are free to modify the code in your forked repository to customize the build process
- After making changes, you can trigger the build process again to get your customized version
-
Stay in Sync with the Main Repository:
- If the main repository is updated with new code or workflows, it is recommended that you periodically sync your
forked repository to get the latest features and fixes
Frequently Asked Questions
Q1: Why can't I trigger the workflow?
A: Please ensure that you have followed the steps to Enable Actions. Otherwise, GitHub will prevent the workflow
from running
Q2: What should I do if the build process fails?
A:
- Check the run logs to understand the cause of the failure
- Ensure there are no syntax errors or dependency issues in the code
- If the problem persists, please open an issue on
the Issues page
Q3: Can I directly use the Actions from the main repository?
A: Due to permission restrictions, you cannot directly trigger Actions from the main repository. Please use the forked
repository to execute the build process
Method 1: Download and extract the files, then copy the old version of the _internal\Volume
folder into the new version's _internal
folder.
Method 2: Download and extract the files (do not run the program), then copy all files and directly overwrite the old version.
- The user's use of this project is entirely at their own discretion and responsibility. The author assumes no liability for any losses, claims, or risks arising from the user's use of this project.
- The code and functionalities provided by the author of this project are based on current knowledge and technological developments. The author strives to ensure the correctness and security of the code according to existing technical capabilities but does not guarantee that the code is entirely free of errors or defects.
- All third-party libraries, plugins, or services relied upon by this project follow their respective open-source or commercial licenses. Users must review and comply with those license agreements. The author assumes no responsibility for the stability, security, or compliance of third-party components.
- Users must strictly comply with the requirements of the GNU General Public License v3.0 when using this project and properly indicate that the code was used under the GNU General Public License v3.0.
- When using the code and features of this project, users must independently research relevant laws and regulations and ensure their actions are legal and compliant. Any legal liabilities or risks arising from violations of laws and regulations shall be borne solely by the user.
- Users must not use this tool to engage in any activities that infringe intellectual property rights, including but not limited to downloading or distributing copyright-protected content without authorization. The developers do not participate in, support, or endorse any unauthorized acquisition or distribution of illegal content.
- This project assumes no responsibility for the compliance of any data processing activities (including collection, storage, and transmission) conducted by users. Users must comply with relevant laws and regulations and ensure that their processing activities are lawful and proper. Legal liabilities resulting from non-compliant operations shall be borne by the user.
- Under no circumstances may users associate the author, contributors, or other related parties of this project with their usage of the project, nor may they hold these parties responsible for any loss or damage arising from such usage.
- The author of this project will not provide a paid version of the DouK-Downloader project, nor will they offer any commercial services related to the DouK-Downloader project.
- Any secondary development, modification, or compilation based on this project is unrelated to the original author. The original author assumes no liability for any consequences resulting from such secondary development. Users bear full responsibility for all outcomes arising from such modifications.
- This project grants no patent licenses; if the use of this project leads to patent disputes or infringement, the user bears all associated risks and responsibilities. Without written authorization from the author or rights holder, users may not use this project for any commercial promotion, marketing, or re-licensing.
- The author reserves the right to terminate service to any user who violates this disclaimer at any time and may require them to destroy all obtained code and derivative works.
- The author reserves the right to update this disclaimer at any time without prior notice. Continued use of the project constitutes acceptance of the revised terms.
Before using the code and functionalities of this project, please carefully consider and accept the above disclaimer. If you have any questions or disagree with the statement, please do not use the code and functionalities of this project. If you use the code and functionalities of this project, it is considered that you fully understand and accept the above disclaimer, and willingly assume all risks and consequences associated with the use of this project.
🌟 Contribution Guidelines
Welcome to contributing to this project! To keep the codebase clean, efficient, and easy to maintain, please read the following guidelines carefully to ensure that your contributions can be accepted and integrated smoothly.
- Before starting development, please pull the latest code from the
develop
branch as the basis for your modifications; this helps avoid merge conflicts and ensures your changes are based on the latest state of the project.
- If your changes involve multiple unrelated features or issues, please split them into several independent commits or pull requests.
- Each pull request should focus on a single feature or fix as much as possible, to facilitate code review and testing.
- Follow the existing coding style; make sure your code is consistent with the style already present in the project; please use the Ruff tool to maintain code formatting standards.
- Write code that is easy to read; add appropriate annotation to help others understand your intentions.
- Each commit should include a clear and concise commit message describing the changes made. The commit message should follow this format:
<type>: <short description>
- When you are ready to submit a pull request, please prioritize submitting them to the
develop
branch; this provides maintainers with a buffer zone for additional testing and review before final merging into the master
branch.
- It is recommended to communicate with the author before starting development or when encountering questions to ensure alignment in direction and avoid redundant efforts or unnecessary commits.
Reference materials:
If DouK-Downloader has been helpful to you, please consider giving it a Star ⭐. Your support is greatly appreciated!
微信(WeChat) |
支付宝(Alipay) |
 |
 |
If you're willing, consider making a contribution to provide additional support for DouK-Downloader!
💰 Project Sponsorship


ZMTO: A professional cloud infrastructure provider offering sophisticated solutions with reliable technology and expert support. We also empower qualified open source initiatives with enterprise-grade VPS infrastructure, driving sustainable development and innovation in the open source ecosystem.

Thordata is a leading proxy IP service specializing in large-scale public web data collection, offering: 195+ countries & cities coverage, 60 million residential IPs from just $0.65/GB, unlimited bandwidth, unlimited IPs, and unlimited concurrent connections. We also provide local dedicated ISP static proxies and high-performance datacenter proxies (both starting at $0.75/IP with flexible pricing). Register by clicking the image and contact our Chinese support team for a free trial. Enjoy a 100% bonus credit on your first recharge! Enhance your data collection efficiency by integrating with EasySpider for high-performance web scraping.
TikHub: Third-party API provider offering multi-platform APIs.
Through daily check-ins, users can earn a small amount of free usage credits. You can also use my referral link: https://user.tikhub.io/users/signup?referral_code=ZrdH8McC or referral code: ZrdH8McC
, register and top up to get a $2 credit!
- Author's Email: yonglelolu@foxmail.com
- Author's WeChat: Downloader_Tools
- Official WeChat Account: Downloader Tools
-
Discord Community: Click to join the community
✨ The author's other open-source projects: