A modern GUI application for downloading YouTube videos and playlists with advanced features like format selection, quality control, and subtitle support.
The YouTube Downloader is a feature-rich desktop application built with Python and Tkinter that allows users to download YouTube videos and playlists with ease. It features a modern, user-friendly interface with real-time progress tracking and comprehensive download options.
The application is built using Python with the following key technologies:
import tkinter as tk
from tkinter import ttk, messagebox
import os
import threading
import logging
import yt_dlp
import json
import subprocess
import sys
import time
from datetime import datetime
from pathlib import Path
# Configure logging
class TextHandler(logging.Handler):
def __init__(self, text_widget):
logging.Handler.__init__(self)
self.text_widget = text_widget
def emit(self, record):
msg = self.format(record)
self.text_widget.configure(state="normal")
self.text_widget.insert(tk.END, msg + "\n")
self.text_widget.see(tk.END)
self.text_widget.configure(state="disabled")
# Custom rounded button class
class RoundedButton(tk.Canvas):
def __init__(self, parent, text, command=None, radius=25, **kwargs):
super().__init__(parent, **kwargs)
self.command = command
self.radius = radius
self.text = text
self.bg = kwargs.get("bg", "#4CAF50")
self.hover_bg = kwargs.get("hover_bg", "#45a049")
self.text_color = kwargs.get("text_color", "white")
self.width = kwargs.get("width", 200)
self.height = kwargs.get("height", 40)
self.configure(width=self.width, height=self.height,
highlightthickness=0, bg=parent["bg"])
self.draw_button()
self.bind("<Enter>", self.on_enter)
self.bind("<Leave>", self.on_leave)
self.bind("<Button-1>", self.on_click)
self.bind("<ButtonRelease-1>", self.on_release)