- Download videos with watermark
- Download videos without watermark
- Download video thumbnail
- Download video audio
- Download video audio cover
- Get details/info about a video
- Download all videos published by a user with watermark
- Download all videos published by a user without watermark
- Download user profile picture
TikTool is still unreleased, but contributions to the project are highly appreciated. Install the module using the following command to test it out and help us develop the project further.
pip install "git+https://github.com/simonfarah/TikTool.git#egg=TikTool"
-
from TikTool import Video video = Video("https://www.tiktok.com/@tiktok/video/xxxxxxxxxx") # all Tiktok video link formats are accepted
# download video with watermark video.downloadVideo(watermark=True) # download video without watermark video.downloadVideo(watermark=False) # if the watermark parameter was not passed, # it will be set to True by default
Extra Checks :
- Funtion will return
False
if :- video is not downloaded
- provided link is not a Tiktok video link
- Function will return
True
if video is downloaded
# download video thumbnail video.downloadThumbnail()
Extra Checks :
- Funtion will return
False
if :- thumbnail is not downloaded
- provided link is not a Tiktok video link
- Function will return
True
if thumbnail is downloaded
# download audio from video video.downloadAudio()
Extra Checks :
- Funtion will return
False
if :- audio is not downloaded
- provided link is not a Tiktok video link
- Function will return
True
if audio is downloaded
# download audio cover from video video.downloadAudioCover()
Extra Checks :
- Funtion will return
False
if :- audio cover is not downloaded
- provided link is not a Tiktok video link
- Function will return
True
if audio cover is downloaded
# get global details about video video.getDetails()
Response to expect :
- Funtion will return
None
if :- provided link is not a Tiktok video link
- Function will return the following if link is valid :
{ "shares": { "total": TOTAL_SHARES, "shares_via_whatsapp": TOTAL_SHARES_VIA_WHATSAPP }, "views_count": VIDEO_VIEWS_COUNT, "downloads_count": VIDEO_DOWNLOADS_COUNT, "likes_count": VIDEO_LIKES_COUNT, "comments_count": VIDEO_COMMENTS_COUNT, "download": { "wm": [LIST OF DOWNLOAD LINKS - WITH WATERMARK], "no-wm": [LIST OF DOWNLOAD LINKS - WITHOUT WATERMARK] }, "music": { "name": MUSIC_NAME, "owner_username": MUSIC_OWNER_USERNAME, "owner_name": MUSIC_OWNER_NAME, "download_link": MUSIC_DOWNLOAD_LINK, "cover_image": MUSIC_COVER_IMAGE_DOWNLOAD_LINK }, "hashtags": [LIST OF HASHTAGS] }
- Funtion will return
-
from TikTool import User user = User("username")
# download all the user published videos (with watermark) user.downloadAllVideos(watermark=True) # download all the user published videos (without watermark) user.downloadAllVideos(watermark=False) # if the watermark parameter was not passed, # it will be set to True by default
Extra Checks :
- Funtion will return
False
if :- user does not exist
- user is a private account
- Function will return
True
if all videos are downloaded
Note : currently, only the newest 33 videos will be downloaded
# download the user profile picture user.downloadProfilePicture()
Extra Checks :
- Funtion will return
False
if :- user does not exist
- Function will return
True
if profile picture is downloaded
- Funtion will return
All the downloaded files will be saved in this folder structure.
The downloads
folder being :
-
At the same directory level of the script running the funtion downloading a file
-
Or in the project root folder
. ├── ... ├── downloads # All downloaded files will be downloaded here | | │ ├── videos # Each video will have a folder named after his ID | | ├── 6871... # Each of those folders will contain the : | | ├── 5381... # - downloaded video (with or without watermark) | | ├── 8142... # - downloaded video thumbnail | | ├── 6897... # - downloaded audio | | ├── 8687... # - downloaded audio cover | | └── ... | | │ ├── users # Each user will have a folder named after his username | | ├── username1 | | | ├── wm # All the user downloaded videos will be here (with watermark) | | | ├── no-wm # All the user downloaded videos will be here (without watermark) | | | ├── username1-profile.jpeg # The user profile picture | | | | | ├── username2 | | | ├── wm | | | ├── no-wm | | | ├── username2-profile.jpeg | | └── ... | | └── ...