Download TikTok Videos Without Watermarks

David Teather
2 min readJul 11, 2020

--

Photo by Christopher Gower on Unsplash

In this article you will write a simple python script that will allow you to download TikTok videos without a watermark given the url.

To be able to retrieve the TikTok data from python run the following command to install a library to help us out.

pip install TikTokApi

This command should automatically install chromium, but if it doesn’t run the following command.

pyppeteer-install

Let’s create a new python file and call it whatever you would like. We will be testing to make sure we are able to retrieve TikTok data from python. Type the following into your python script.

from TikTokApi import TikTokApi
api = TikTokApi()
print(api.trending())

Run your python script, hopefully it will output data in a python dictionary format. If the script does not do that visit TikTokApi’s Github page your issue most likely will be already solved in the closed issues section, just search for any errors you may be getting.

Now we will modify the existing script (or you can create a new one), to ask the user for a tiktok url and then it will download the tiktok without a watermark.

print("Input the TikTok URL")
url = input()

This will ask the user to input the URL, then it stores the url into the variable named url, which we will use in the next segment. Add the following lines to your script.

from TikTokApi import TikTokApi
api = TikTokApi()

This imports the library we installed a few steps ago and allows us to be able to interact with it using the api variable.

The next segment will retrieve the bytes of the TikTok without a watermark. Add the following line to your code.

video_bytes = api.get_Video_No_Watermark(url)

Now we will have to write the video_bytes to an mp4 file using python, luckily it’s very simple and all we have to add if the next few lines.

with open("tiktok.mp4", 'wb') as output:
output.write(video_bytes)

Congratulations you’ve downloaded a TikTok video without any watermarks. I hope you’ve enjoyed the article check out my other stories for more TikTok scripts.

Below is the full script for your convenience.

print("Input the TikTok URL")
url = input()
from TikTokApi import TikTokApi
api = TikTokApi()
video_bytes = api.get_Video_No_Watermark(url)
with open("tiktok.mp4", 'wb') as output:
output.write(video_bytes)

--

--