vgvr0 / TikTok-Video-Downloader-using-Python-and-yt-dlp

A Python script for downloading TikTok videos using the yt-dlp library. Easily download your favorite TikTok videos and save them to your specified directory.
8 stars 3 forks source link
tiktok tiktok-api tiktok-downloader tiktok-follower tiktok-video-downloader tiktok-view-bot tiktok-views

🎵 TikTok Video Downloader Pro

TikTok Cover

A powerful and efficient Python tool for downloading TikTok videos with advanced features and error handling.

Python PyCharm Git Telegram yt-dlp License: MIT

✨ Features

🚀 Prerequisites

📦 Installation

  1. Clone the repository:

    git clone https://github.com/vgvr0/TikTok-Video-Downloader-using-Python-and-yt-dlp
    cd tiktok-downloader-pro
  2. Create a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt

💻 Usage

Basic Usage

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)

Advanced Usage

# 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)

🛠️ Configuration Options

Parameter Description Default
save_path Directory to save videos 'tiktok_videos'
custom_name Custom name for the video None
use_cookies Use browser cookies True
quiet_mode Suppress progress output False

📋 Example Output

Downloading: 45.2% at 1.2 MB/s ETA: 00:15
Download completed, finalizing...
Video successfully downloaded: my_tiktoks/dance_video_20240106_123045.mp4

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

⚠️ Disclaimer

This tool is for educational purposes only. Make sure to comply with TikTok's terms of service and respect content creators' rights when using this tool.

📞 Support

If you encounter any issues or have questions: