Skip to content

wireMuffin/tkDownloaderWrapper

Repository files navigation

TikTok Video Downloader

A modern, cross-platform desktop application built with Avalonia UI for downloading TikTok videos. This application supports batch downloads and features a production-ready UI/UX with comprehensive progress tracking.

Features

  • 📱 Multi-URL Support: Download multiple TikTok videos simultaneously
  • 🎨 Modern UI: Elegant, production-ready interface with card-based design
  • 📊 Advanced Progress Tracking: Individual progress bars for each download with overall batch progress
  • 🌍 Cross-platform: Runs seamlessly on Windows, macOS, and Linux
  • 📁 Smart File Management: Automatic filename generation with video IDs and timestamps
  • 🔍 Real-time Validation: Instant URL validation with helpful error messages
  • 📝 Activity Logging: Comprehensive logging with timestamps and monospace font
  • ⚡ Batch Operations: Clear all URLs, clear logs, and cancel downloads
  • 🎯 Individual Status Tracking: See the status of each video download in real-time
  • 🌐 Multi-language Support: Full internationalization with English, Simplified Chinese, Traditional Chinese, and Thai
  • 🔄 Dynamic Language Switching: Change language on-the-fly without restarting
  • 📥 Log Export: Download activity logs as text files with timestamps and metadata
  • 🔨 Cross-Platform Builds: Comprehensive Makefile for Windows/Linux/macOS with x86/ARM64 support

Requirements

  • .NET 8.0 or later
  • Internet connection

How to Build

  1. Clone or download this repository
  2. Open a terminal in the project directory
  3. Restore dependencies:
    dotnet restore
  4. Build the application:
    dotnet build
  5. Run the application:
    dotnet run

Cross-Platform Building

Use the included Makefile for production builds:

# Build for all platforms
make build-all

# Build for specific platforms
make win-x64        # Windows x64
make linux-x64      # Linux x64
make macos-arm64    # macOS Apple Silicon

# Create distribution packages
make package

# See all available targets
make help

See BUILD.md for detailed build documentation.

How to Use

Single Video Download

  1. Launch the application
  2. Paste a TikTok URL in the multi-line input field
    • Example: https://www.tiktok.com/@who/video/7528459767468133654?lang=en
  3. Click "Download Videos"
  4. Select a folder where videos will be saved
  5. Monitor progress in real-time

Batch Video Download

  1. Paste multiple TikTok URLs (one per line) in the input field:
    https://www.tiktok.com/@user1/video/1234567890
    https://www.tiktok.com/@user2/video/0987654321
    https://www.tiktok.com/@user3/video/1122334455
    
  2. Click "Download Videos"
  3. Select a download folder
  4. Watch individual progress for each video
  5. View batch completion summary

Interface Features

  • Clear All: Removes all URLs and resets the interface
  • Clear Log: Clears the activity log
  • Download Logs: Export activity logs to text files with full metadata
  • Progress Cards: Each video shows individual download status and progress
  • Overall Progress: See total batch completion percentage
  • Smart Filenames: Videos are saved as TikTok_{VideoID}_{Timestamp}.mp4
  • Language Selector: Choose from English, Simplified Chinese, Traditional Chinese, or Thai
  • Real-time Translation: All UI elements update immediately when language is changed

The application will:

  • Validate all TikTok URLs before starting
  • Process downloads sequentially for stability
  • Show real-time progress for each video
  • Generate unique filenames automatically
  • Provide detailed logging of all activities
  • Handle errors gracefully with clear status messages

Technical Details

API Integration

  • Uses TikSave.io API endpoint: https://tiksave.io/api/ajaxSearch
  • Sends URL-encoded POST requests with the TikTok video URL
  • Parses HTML responses to extract direct video download links

Libraries Used

  • Avalonia UI: Cross-platform .NET UI framework
  • ReactiveUI: MVVM framework for reactive programming
  • HtmlAgilityPack: HTML parsing library
  • System.Net.Http: HTTP client for API calls
  • Microsoft.Extensions.Localization: Internationalization and localization support

Architecture

  • MVVM Pattern: Clean separation of UI and business logic
  • Reactive Commands: Asynchronous command handling
  • Data Binding: Two-way binding between view and view model
  • Resource-based Localization: .resx files for each supported language
  • Dynamic Language Service: Singleton service for runtime language switching

Supported Platforms

  • Windows 10/11
  • macOS 10.15+
  • Linux (various distributions)

Supported Languages

  • English - Default language
  • 简体中文 (Simplified Chinese) - Full translation
  • 繁體中文 (Traditional Chinese) - Full translation
  • ไทย (Thai) - Full translation

Language can be switched at runtime using the dropdown in the header. All UI elements, status messages, and log entries will update immediately.

License

This project is for educational purposes. Please respect TikTok's terms of service and only download videos you have permission to download.

Troubleshooting

Common Issues

  1. "Invalid URLs found"

    • Ensure all URLs contain tiktok.com and /video/
    • Example format: https://www.tiktok.com/@username/video/1234567890
    • Remove any malformed URLs from the input
  2. "Failed to extract download URL"

    • Some videos might be private or restricted
    • Videos may have geographic restrictions
    • Check your internet connection
    • Try different videos if the issue persists
  3. Batch download partially fails

    • Individual videos may fail while others succeed
    • Check the individual status of each download item
    • Failed videos will show "Failed" status with red color
    • Retry failed downloads by copying their URLs to a new session
  4. Download speed issues

    • Downloads are processed sequentially for stability
    • Large batches may take considerable time
    • Use folder selection to organize downloads
    • Monitor individual progress bars for detailed status

Debug Information

The application provides detailed logging in the Log section, showing:

  • API call status
  • HTML parsing results
  • Download progress
  • Error messages with timestamps

If you encounter issues, check the log messages for detailed error information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published