Skip to content

Latest commit

 

History

History
315 lines (274 loc) · 20.5 KB

README_EN.md

File metadata and controls

315 lines (274 loc) · 20.5 KB
TikTokDownloader

TikTokDownloader

简体中文 | English

GitHub GitHub forks GitHub Repo stars GitHub code size in bytes
Static Badge GitHub release (with filter) GitHub all releases

🔥 TikTok Account Works/Mix/Live/Video/Image/Music; Douyin Account Works/Video/Image/LivePhoto/Favorites/Live/Music/Collections/Comments/Account Data/Search Data/Hot Board Data Acquisition Tools: Fully open-source, free tools implemented based on the HTTPX module; batch download of Douyin account posts works, liked 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 comment 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.

⭐ This project is completely free and open-source, with no paid features. Please do not be deceived!

⭐ 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.


📝 Project Features

  • ✅ Download Douyin video/image without watermarks
  • ✅ Download TikTok video/image without watermarks
  • ✅ Batch download of Douyin account posts/liked/favorites works
  • ✅ Batch 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
  • ✅ 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 comment 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
  • ✅ Automatically update account nicknames
  • ✅ 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
  • ✅ Support resume downloading of files from breakpoints

💻 Program Screenshot

Terminal interaction mode:

终端模式截图


终端模式截图


终端模式截图

Web UI interaction mode:

WebUI模式截图


WebUI模式截图


WebUI模式截图

Web API mode:

WebAPI模式截图

📽 Operation Demonstration

🎥 Click the image to watch the demo video, it is recommended to manage the account through the configuration file. For more information, please refer to the documentation.

演示视频

📈 Project Status

  • 🟢 After testing, the source code published on Releases has been verified and all functions are normal.
  • 🟡 For the development plans and progress of TikTokDownloader, please visit Projects.
  • 🔴 Note that the latest source code (Beta version) may have some unstable bugs.
  • 🔴 If you find any program bugs during use, please inform the author promptly for repairs.

📋 Project Instructions

Quick Start

⭐ Mac OS and Windows 10 and above users can go to Releases to download the compiled program, ready to use!

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!


  1. Run the executable file or configure the environment to run
      Run the executable file
    1. Download the compressed package of the executable file published on Releases.
    2. After extracting, open the program folder and double-click to run main.
      Configure the environment to run
    1. Install Python interpreter version 3.12
    2. Download the latest source code or the source code published on Releases to your local machine.
    3. Run the command python -m venv venv to create a virtual environment (optional).
    4. Run the command .\venv\Scripts\activate.ps1 or venv\Scripts\activate to activate the virtual environment (optional).
    5. Run the command pip install -r requirements.txt to install the required modules for the program.
    6. Run the command python .\main.py or python main.py to start TikTokDownloader.
  2. Read the disclaimer of TikTokDownloader and enter content according to the prompt.
  3. Write Cookie information into the configuration file
      Manually copy and paste Cookie (recommended)
    1. Refer to Cookie Extraction Tutorial, copy the required Cookie to the clipboard.
    2. Select the option to copy and paste to write Cookie, and follow the prompts to write the Cookie into the configuration file.
      Get Cookie from Browser (recommended)
    1. Select the option Get Cookie from Browser and follow the prompts to choose the browser type.
      Scan code login to get Cookie (deprecated)
    1. Select the option Scan code login to get Cookie, and the program will display a login QR code image and open the image with the default application.
    2. Use the Douyin APP to scan the QR code and log into your account.
    3. Follow the prompts to write the Cookie into the configuration file.
  4. 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.
  5. Input the Douyin works link to download the works file (the TikTok platform requires more initial setup, please refer to the documentation for details).
  6. For more detailed instructions, please see Project Documentation.

⭐ It is recommended to use Windows Terminal (the default terminal that comes with Windows 11).

Docker Container

  1. Get the image
    • Method 1: Build the image using the Dockerfile.
    • Method 2: Pull the image using the command docker pull joeanamier/tiktokdownloader.
  2. Create the container: docker run -it joeanamier/tiktokdownloader.
  3. 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!


About Cookie

Click to view Cookie tutorial

Program Function Login Required
Download Account Posts Works ⭕ Recommended to Login
Download Account Liked Works ⭕ Recommended to Login
Download Linked Works ⭕ Recommended to Login
Obtain Live Stream Address ❌ No Login Required
Download Live Video ❌ No Login Required
Obtain Works Comment Data ⭕ Recommended to Login
Download Mix Works ⭕ Recommended to Login
Obtain Account Data ⭕ Recommended to Login
Collect Search Results ⭕ Recommended to Login
Collect Hot Board Data ❌ No Login Required
Download Favorites Works ✔️ Login Required
Download Collections Works ✔️ Login Required
Obtain Collections Mix ✔️ Login Required
Obtain Collections Music ✔️ Login Required
Obtain Collections Series ✔️ Login Required
  • 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!


Other Instructions

  • 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 favorited 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.
  • To exit the program, please end it in a normal way or by pressing Ctrl + C. Do not directly close the terminal window, as this may result in data loss.
  • 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.

Program Update

Option 1: Download and unzip the files, then copy the old version of the TikTokDownloader.db file and the settings.json file into the _internal folder.

Option 2: Download and unzip the files (without running the program), then copy all the files and directly overwrite the old version files.

⚠️ Disclaimer

  • Users decide on their own how to use this project and bear the risks themselves. The author is not responsible for any losses, liabilities, or risks incurred by users in the use of this project
  • The code and functionalities provided by the author of this project are developed based on existing knowledge and technology. The author strives to ensure the correctness and security of the code but does not guarantee that the code is completely error-free or defect-free.
  • Users must strictly adhere to the provisions in GNU General Public License v3.0 , and appropriately mention the use of code adhering GNU General Public License v3.0.
  • Under no circumstances shall users associate the author of this project, contributors, or other related parties with the user's usage behavior, or demand that they be held responsible for any losses or damages incurred by the user's use of this project.
  • Users must independently study relevant laws and regulations when using the code and functionalities of this project and ensure that their usage is legal and compliant. Users are solely responsible for any legal liability and risks resulting from violations of laws and regulations.
  • The author of this project will not provide a paid version of the TikTokDownloader project, nor will they offer any commercial services related to the TikTokDownloader project.
  • Any secondary development, modification, or Collections of the program based on this project is unrelated to the original author. The original author is not responsible for any consequences related to secondary development or its results. Users should take full responsibility for any situations that may arise from secondary development on their own.
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.

✉️ Contact the Author

The author's other open-source projects:

♥️ Support the Project

If TikTokDownloader 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 TikTokDownloader!

💰 Project Sponsorship

JetBrains Tools

PyCharm logo

JetBrains support active projects recognized within the global open-source community with complimentary licenses for non-commercial development.


TikHub

TikHub

TikHub is a leading data interface service provider, specializing in offering high-quality data interfaces for multiple popular platforms, including Douyin, TikTok, Xiaohongshu, Instagram, Twitter, and Kuaishou.

TikHub also provides customized services such as live streaming room monitoring, post monitoring, and influencer monitoring to meet the needs of different business scenarios.

Through daily sign-ins, users can obtain a certain quota of usage for free. You can use my referral linkhttps://beta-web.tikhub.io/users/signup?referral_code=X084IATy or Referral CodeX084IATy,Register and recharge to receive $2 limit!

TikHub Provide the following services:

💡 Project References