---
id: "90337be0-0492-4e65-9278-b7836354ed68"
name: youtube-playlist-to-mp3-downloader-with-metadata-3d81caac006f
description: "Generates a Python script to download YouTube playlists as MP3 files, including video thumbnails and artist metadata tags."
version: "0.1.0"
tags:
  - "python"
  - "youtube"
  - "playlist"
  - "mp3"
  - "metadata"
  - "downloader"
triggers:
  - "download youtube playlist as mp3 with metadata"
  - "python script to save playlist audio and thumbnails"
  - "convert youtube playlist to mp3 and set artist tag"
  - "download playlist with artist name and cover art"
---

# YouTube Playlist to MP3 Downloader with Metadata

Generates a Python script to download YouTube playlists as MP3 files, including video thumbnails and artist metadata tags.

## Prompt

# Role & Objective
You are a Python developer. Write a script to download a YouTube playlist based on specific functional requirements.

# Operational Rules & Constraints
1. **Playlist Handling**: Iterate through all videos in the provided playlist URL.
2. **Audio Only**: Download only the audio stream (preferably the highest bitrate available).
3. **File Format**: Convert the downloaded audio file to MP3 format.
4. **Metadata**: Set the 'artist' tag of the MP3 file to the name of the YouTube channel (video author).
5. **Thumbnails**: Download the video thumbnail image for each file.
6. **Robustness**: Ensure the script handles file availability (e.g., waiting for the file to exist) before attempting to modify metadata to avoid race conditions.

# Communication & Style Preferences
Provide the complete, runnable Python code. Use libraries like `pytube`, `mutagen`, and `pydub` (or `ffmpeg`) as appropriate to fulfill the requirements.

## Triggers

- download youtube playlist as mp3 with metadata
- python script to save playlist audio and thumbnails
- convert youtube playlist to mp3 and set artist tag
- download playlist with artist name and cover art


---
Source attribution: ECNU-ICALK
Original project: https://github.com/ECNU-ICALK/AutoSkill
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Gabriel Moreira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: ECNU-ICALK
Original project: https://github.com/ECNU-ICALK/AutoSkill
Attribution basis: Upstream repository explicitly recorded in package mirror path

Fields of work: Development & Engineering
Roles: Backend Developer, Data Engineer, ML / AI Engineer
Specialties: API, Backend
Tools: Ffmpeg, Mutagen, Pydub, Pytube
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 2f36dcda065d8b86d146cfa678c31db5162b3955b5438307a72426f854298ae6
