Tiktokapi

Latest version: v6.5.2

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 11 of 20

3.6.0

Consider using this API as a service it supports this project [here](https://rapidapi.com/rapidapideveloper/api/tiktok2/endpoints)

Consider sponsoring me on github [here](https://github.com/sponsors/davidteather) or donating on paypal [here](https://www.paypal.me/dteather)

Connect with me on [LinkedIn](https://www.linkedin.com/in/davidteather)

Update with the following command

pip install TikTokApi --upgrade

3.5.9

Since TikTok is checking if the DID matches to download a TikTok you'll need to implement something like the following to download TikToks, or you can use api.get_Video_By_URL see 296 for more information.

from TikTokApi import TikTokApi
import random

api = TikTokApi()
did = str(random.randint(10000, 999999999))
tiktoks = api.trending(custom_did=did)

for t in tiktoks:
The bytes of the TikTok to download
b = api.get_Video_By_TikTok(t, custom_did=did)


**NOTE:** I haven't experimented without using a randomly generated DID, so you may end up getting blocked or something. If you do get blocked change the DID variable again and retry.

Consider using this API as a service it supports this project [here](https://rapidapi.com/rapidapideveloper/api/tiktok2/endpoints)

Consider sponsoring me on github [here](https://github.com/sponsors/davidteather) or donating on paypal [here](https://www.paypal.me/dteather)

Connect with me on [LinkedIn](https://www.linkedin.com/in/davidteather)

Update with the following command

pip install TikTokApi --upgrade

3.5.8

Found a solution, most of the get_video_by methods won't currently work as I'm kinda tired right now and there's probably better logic to do this, but in the meantime, the following script will work when the package is updated (probably 30 minutes)


from TikTokApi import TikTokApi
api = TikTokApi()
tiktok_url = "https://www.tiktok.com/kaweee1234/video/6883470508726258949"
video_bytes = api.get_Video_By_Url(tiktok_url)


It might be a while before fixing the other methods so use this one for now. If you have a TikTok object you can construct the URL yourself using the schema something like `"https://www.tiktok.com/{}/video/{}?lang=en".format(tiktok['author']['uniqueId'], tiktok['id'])` but the use of that depends on what the schema you're getting looks like.

Consider using this API as a service it supports this project [here](https://rapidapi.com/rapidapideveloper/api/tiktok2/endpoints)

Consider sponsoring me on github [here](https://github.com/sponsors/davidteather) or donating on paypal [here](https://www.paypal.me/dteather)

Connect with me on [LinkedIn](https://www.linkedin.com/in/davidteather)

Update with the following command

pip install TikTokApi --upgrade

3.5.7

Changed a few minor things but the trending function broke and is now fixed

Consider using this API as a service it supports this project [here](https://rapidapi.com/rapidapideveloper/api/tiktok2/endpoints)

Consider sponsoring me on github [here](https://github.com/sponsors/davidteather) or donating on paypal [here](https://www.paypal.me/dteather)

Connect with me on [LinkedIn](https://www.linkedin.com/in/davidteather)

Update with the following command

pip install TikTokApi --upgrade

3.5.6

TikTok deprecated some endpoints

Consider using this API as a service it supports this project [here](https://rapidapi.com/rapidapideveloper/api/tiktok2/endpoints)

Consider sponsoring me on github [here](https://github.com/sponsors/davidteather) or donating on paypal [here](https://www.paypal.me/dteather)

Connect with me on [LinkedIn](https://www.linkedin.com/in/davidteather)

Update with the following command

pip install TikTokApi --upgrade

3.5.5

TikTok changed lang parameter to language

Consider using this API as a service it supports this project [here](https://rapidapi.com/rapidapideveloper/api/tiktok2/endpoints)

Consider sponsoring me on github [here](https://github.com/sponsors/davidteather) or donating on paypal [here](https://www.paypal.me/dteather)

Connect with me on [LinkedIn](https://www.linkedin.com/in/davidteather)

Update with the following command

pip install TikTokApi --upgrade

Page 11 of 20

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.