一个强大而高效的 Python 工具,用于下载 TikTok 视频,具有高级功能和错误处理功能。
yt-dlp>=2023.3.4
typing>=3.7.4
git clone https://github.com/vgvr0/TikTok-Video-Downloader-using-Python-and-yt-dlp
cd tiktok-downloader-pro
python -m venv venv
source venv/bin/activate # On Windows: venvScriptsactivate
pip install -r requirements.txt
from tiktok_downloader import TikTokDownloader
# Initialize downloader
downloader = TikTokDownloader ()
# Download single video
video_url = "https://www.tiktok.com/@username/video/1234567890"
downloader . download_video ( video_url )
# Custom save location and filename
downloader = TikTokDownloader ( save_path = 'my_tiktoks' )
downloader . download_video ( video_url , custom_name = "dance_video" )
# Download multiple videos
urls = [
"https://www.tiktok.com/@user1/video/1234567890" ,
"https://www.tiktok.com/@user2/video/0987654321"
]
for url in urls :
downloader . download_video ( url )
范围 | 描述 | 默认 |
---|---|---|
保存路径 | 保存视频的目录 | 'tiktok_videos' |
自定义名称 | 视频的自定义名称 | 没有任何 |
使用cookie | 使用浏览器cookie | 真的 |
安静模式 | 抑制进度输出 | 错误的 |
Downloading: 45.2% at 1.2 MB/s ETA: 00:15
Download completed, finalizing...
Video successfully downloaded: my_tiktoks/dance_video_20240106_123045.mp4
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅许可证文件。
该工具仅用于教育目的。使用此工具时,请务必遵守 TikTok 的服务条款并尊重内容创作者的权利。
如果您遇到任何问题或有疑问: