Giter VIP home page Giter VIP logo

gytmdl's Introduction

Glomatico's YouTube Music Downloader

Download YouTube Music songs/albums/playlists with tags from YouTube Music in 256kbps AAC/128kbps Opus/128kbps AAC.

Why not just use yt-dlp directly?

While this project uses yt-dlp under the hood to download songs from YouTube Music, it has the advantage of utilizing YouTube Music's API to get songs metadata, ensuring that you get the correct tags for your songs. This includes information such as track number, square cover, lyrics, year, etc.

Setup

  1. Install Python 3.8 or higher
  2. Install gytmdl with pip
    pip install gytmdl
    
  3. Add FFMPEG to your PATH. You can get it from here: https://ffmpeg.org/download.html
    • If you are on Windows you can move the ffmpeg.exe file to the same folder that you will run the script instead of adding it to your PATH.
  4. (optional) Get your cookies.txt
    • With cookies.txt, you can download age restricted tracks, private playlists and songs in 256kbps AAC using --itag 141 argument if you are a premium user. You can export your cookies by using the following Google Chrome extension on YouTube Music website with your account logged in: https://chrome.google.com/webstore/detail/gdocmgbfkjnnpapoeobnolbbkoibbcif. Make sure to export it as cookies.txt to the same folder that you will run the script.

Usage

usage: gytmdl [-h] [-u [URLS_TXT]] [-t TEMP_PATH] [-f FINAL_PATH] [-c COOKIES_LOCATION] [-i {141,251,140}] [-o]
                   [-s] [-e] [-v]
                   [<url> ...]

Download YouTube Music songs/albums/playlists with tags from YouTube Music

positional arguments:
  <url>                 YouTube Music song/album/playlist URL(s) (default: None)

options:
  -h, --help            show this help message and exit
  -u [URLS_TXT], --urls-txt [URLS_TXT]
                        Read URLs from a text file (default: None)
  -t TEMP_PATH, --temp-path TEMP_PATH
                        Temp path (default: temp)
  -f FINAL_PATH, --final-path FINAL_PATH
                        Final path (default: YouTube Music)
  -c COOKIES_LOCATION, --cookies-location COOKIES_LOCATION
                        Cookies location (default: cookies.txt)
  -i {141,251,140}, --itag {141,251,140}
                        itag (quality). Can be 141 (256kbps AAC, requires cookies), 251 (128kbps Opus) or 140 (128kbps
                        AAC) (default: 140)
  -o, --overwrite       Overwrite existing files (default: False)
  -s, --skip-cleanup    Skip cleanup (default: False)
  -e, --print-exceptions
                        Print exceptions (default: False)
  -v, --version         show program's version number and exit

gytmdl's People

Contributors

glomatico avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.