一個強大而高效的 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 的服務條款並尊重內容創作者的權利。
如果您遇到任何問題或有疑問: