MIT License

项目介绍

DhananjayPorwal/youtube-playlist-downloader 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 MIT License 许可证,目前获得 65 个 Star、21 次 Fork。

仓库全名
DhananjayPorwal/youtube-playlist-downloader
开源许可证
MIT License
Star 数
65
Fork 数
21

README 摘要

YouTube Playlist Downloader ✨ This repository contains a Python project for downloading all the videos from a YouTube playlist. The project now includes both a Command Line Interface (CLI) and a Graphical User Interface (GUI) built with PyQt5. The original script has been updated to use ytdlp (instead of the outdated pytube) to handle the download and conversion process. Features Playlist Downloads: Downloads all…

完整内容见 GitHub 原始 README 或本页 。

常见问题

youtube-playlist-downloader 用什么语言开发?

主要使用 Python 编写,采用 MIT License 许可证,目前有 65 个 Star。

youtube-playlist-downloader 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 youtube-playlist-downloader 的源码?

可以直接克隆仓库:git clone https://github.com/DhananjayPorwal/youtube-playlist-downloader.git,默认分支为 main;安装与运行步骤见仓库 README。

youtube-playlist-downloader 最近还在维护吗?

仓库最近一次更新为 2025年2月9日,当前没有未关闭的 Issue;Star 数为 65,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

This repository contains a Python script for downloading YouTube playlist videos using "pytube".

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

Python

README

YouTube Playlist Downloader ✨

youtube-playlist-downloader

This repository contains a Python project for downloading all the videos from a YouTube playlist. The project now includes both a Command Line Interface (CLI) and a Graphical User Interface (GUI) built with PyQt5. The original script has been updated to use yt_dlp (instead of the outdated pytube) to handle the download and conversion process.

Features

  • Playlist Downloads: Downloads all videos from a given YouTube playlist URL.
  • Folder Naming: Converts the playlist title into an alphanumeric folder name to store downloaded videos.
  • High Resolution: Downloads each video with the highest available resolution.
  • CLI and GUI: Choose between the CLI version (using playlist_downloader.py) or the GUI version (app.py) for intuitive operation.
  • Real-Time Updates: The GUI provides real-time download progress and error reporting.
  • Executable Build: Easily build an executable using PyInstaller.

GUI Screenshot

Installation

  1. Clone the repository:
git clone https://github.com/DhananjayPorwal/youtube-playlist-downloader.git
  1. Change into the project directory:
cd youtube-playlist-downloader/youtube-playlist-downloader
  1. Set up a virtual environment (recommended):
python3 -m venv venv
source venv/bin/activate
  1. Install the required dependencies:
pip install -r requirements.txt

Usage

Command Line Interface (CLI)

  1. Run the CLI script:
python playlist_downloader.py
  1. Follow the prompt:

    • Enter the YouTube playlist URL when prompted.
    • The script will create a folder (named by the sanitized playlist title and download all videos into it.
    • Progress updates and video size details are displayed in the terminal.

Graphical User Interface (GUI)

  1. Run the GUI application:
python app.py
  1. Using the GUI:

    • Enter the YouTube playlist URL in the provided input field.
    • Click the “Download” button.
    • The GUI displays real-time progress in a log area.
    • A success message is shown when the process is complete.

Creating an Executable

Since I’m on Ubuntu, you can build an executable for your environment as follows:

  1. Build the executable with PyInstaller:
pyinstaller --onefile app.py
  1. Executable:

    • This will generate an executable file in the dist folder.
    • Note: The executable is platform-specific. To create executables for Windows or macOS, you need to build the project on those platforms.

Known Errors

CLI

  • Folder Already Exists:

If a folder with the same name as the playlist already exists, the script will throw an error because it cannot recreate the folder. To resolve, delete or rename the existing folder before running the script.

GUI

  • Unresponsive Behavior:

The GUI may appear unresponsive during long downloads. This is due to heavy processing in the background thread. Please be patient while the process completes; the GUI logs and final success message indicate completion.

Additional Notes

  • The project now uses yt_dlp for improved compatibility and performance compared to the legacy pytube library.
  • For cross-platform builds, remember that executables are OS specific. Currently, only the Ubuntu executable is provided (built with PyInstaller on Ubuntu).

Resources

评论

暂无评论