Releases: davidteather/TikTok-Api
V3.6.0 - Fix ByHashtag
V3.5.9 - Allow For Custom DID Parameter
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
Consider sponsoring me on github here or donating on paypal here
Connect with me on LinkedIn
Update with the following command
pip install TikTokApi --upgrade
V3.5.8 - Fix Download Issue
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
Consider sponsoring me on github here or donating on paypal here
Connect with me on LinkedIn
Update with the following command
pip install TikTokApi --upgrade
V3.5.7 - Critical Trending Issue Fixed
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
Consider sponsoring me on github here or donating on paypal here
Connect with me on LinkedIn
Update with the following command
pip install TikTokApi --upgrade
V3.5.6 - Fix TikTok Endpoint Deprecration
V3.5.5 - Fix Language Parameter
V3.5.4 - TikTokUser Class
Check out the TikTokUser class. I'm planning to add more methods if and when I have more time.
Consider using this API as a service it supports this project here
Consider sponsoring me on github here or donating on paypal here
Connect with me on LinkedIn
Update with the following command
pip install TikTokApi --upgrade
V3.5.3 - Deprecated 3.5 - Added optional Executable path
DEPRECRATED PYTHON 3.5
People using this package on 3.5 get like 2 downloads a month so it was time.
Added optional executable path for chromedriver when creating the TikTokApi class.
Consider using this API as a service it supports this project here
Consider sponsoring me on github here or donating on paypal here
Connect with me on LinkedIn
Update with the following command
pip install TikTokApi --upgrade
V3.5.2 - Fixed an issue
V3.5.1 - Fix non-latin Hashtags
TikTok was handling non-latin hashtags strangely before, but they changed it and are handling it like an actual company so I've updated the code to do that.
Consider sponsoring me on github here or donating on paypal here
Also, consider using this API as a service it supports this project here
Update with the following command
pip install TikTokApi --upgrade