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.6.tar.gz (6.5 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.6-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for qa_download-1.0.6.tar.gz
Algorithm Hash digest
SHA256 60256cf22d14dadd49ad7f7bead21bfa8032ce02edf394b8d84611118dc711f9
MD5 b40a3bf07e3dd9baef1c04de8929f46a
BLAKE2b-256 3331892d99bb76b6cdee6906e1c4987930b24aa9b5572367a8854788199eda09

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for qa_download-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9e368f3cd23228db3d7198bee16ec4e883c797ad7b2959f2df5c1050e0fe077c
MD5 aeb04aa9eb361c4277e4016e78de29a9
BLAKE2b-256 4866f8bccb2a684d9918bf665b486dca725dcac6189ced524016fb76b70aa4be

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