Skip to main content

A tool for downloading music with embedded metadata and lyrics.

Project description

Here's the updated README.md with samples for downloading using a YouTube URL, along with a note recommending using the song name for better metadata matching:


Music Downloader 🎶

Music Downloader is a Python tool that downloads music from YouTube and automatically embeds metadata, album artwork, and lyrics from Genius. Perfect for building your offline music library with well-organized tags and rich media.

Features

  • Downloads audio from YouTube as MP3
  • Embeds metadata like title, artist, album, and release date
  • Fetches album artwork and attaches it to the MP3
  • Adds lyrics automatically from Genius
  • Works with most Python environments and media players

Installation

You can install Music Downloader via the qa-download package from PyPI:

pip install qa-download

Requirements

  • Python 3.7 or higher
  • YouTube audio extraction and metadata libraries (automatically installed with the package)

Usage

Once installed, use music-downloader directly from the command line.

Recommended: Using the song title (instead of a YouTube URL) gives more accurate metadata from Genius.

Downloading by Song Name

Using a song title helps Music Downloader find better metadata, artwork, and lyrics from Genius:

music-downloader "Song Title"

By default, files are saved in your Music directory, but you can specify a custom directory with the --output_dir option:

music-downloader "Song Title" --output_dir "/path/to/save/music"

Downloading by YouTube URL

If you have a specific YouTube URL, you can still use it with the downloader. However, it may miss some metadata, so using the song title is recommended for a richer media experience.

music-downloader "https://www.youtube.com/watch?v=EXAMPLE_VIDEO_ID"

For YouTube playlists, simply provide the playlist URL:

music-downloader "https://www.youtube.com/playlist?list=EXAMPLE_PLAYLIST_ID"

In both cases, Music Downloader will download each video in the playlist and try to match metadata from Genius for each song.

Example Commands

# Recommended method for best metadata
music-downloader "Let Me Down Slowly Alec Benjamin"

# Using a single YouTube video URL
music-downloader "https://www.youtube.com/watch?v=EXAMPLE_VIDEO_ID"

# Using a YouTube playlist URL
music-downloader "https://www.youtube.com/playlist?list=EXAMPLE_PLAYLIST_ID"

Command-Line Options

  • input: The YouTube URL, playlist URL, or song title you want to download.
  • --output_dir: Custom directory to save the downloaded audio. Defaults to ~/Music.

Development

If you'd like to contribute or experiment with the code, fork and clone the repository and install dependencies:

git clone https://github.com/yourusername/music_downloader.git
cd music_downloader
pip install -r requirements.txt

Running Locally

To run the downloader locally:

python -m music_downloader.downloader "Song Title"

Contribution

We welcome contributions to improve Music Downloader! To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Make your changes, and ensure all code is properly documented and tested.
  4. Submit a pull request with a detailed explanation of your changes.

Please make sure your contributions align with the project’s code style and conventions. Feel free to open an issue if you'd like to discuss your contribution before starting.

License

This project is licensed under the MIT License.

Acknowledgments

  • Uses yt-dlp for downloading YouTube audio.
  • Metadata and lyrics from Genius.

Support

For issues or feature requests, please open an issue on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qa_download-1.0.3.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qa_download-1.0.3-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file qa_download-1.0.3.tar.gz.

File metadata

  • Download URL: qa_download-1.0.3.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for qa_download-1.0.3.tar.gz
Algorithm Hash digest
SHA256 22d88c0dbfef229f8c3d5649e9d80ccc883ad2793a506f022af69f1c5fe6de5f
MD5 9d62efc2f721e54c7a79cf2d46d98517
BLAKE2b-256 c916ef89045792903155581bd602972ad59f0dfcd07c59f3537f4f29479ab86e

See more details on using hashes here.

File details

Details for the file qa_download-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: qa_download-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for qa_download-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e8bcf6d2e3403877beffacb543e7acd37a88de62d453b6e80fb6018e2c958d29
MD5 f0325c03b9572653ba06129c4a7ba665
BLAKE2b-256 a162d23150142d02dc47d10bf358a161a760b2c0a38ccd14324186aad9e577f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page