occupytheweb / Youtube-mp3-downloader-light

A Youtube mp3 downloader in less than 70 lines of code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Youtube-Downloader-Light

YTDL is a python script to download songs from Youtube ❤️ , It has been written in under 70 lines of code! 😤

Disclaimer

This project has been made for educational purposes using python language and does not support or encourage pirating activities.


Contributors

Started as a fun project, YTDL is at it's current because of contributions from amazing people all over the world.

Installation

1. Clone this repository

   $ git clone https://github.com/ionicc/Youtube-mp3-downloader-light
   $ cd Youtube-mp3-downloader-light

2. Setup

Linux and MacOS:

   $ make install

or,

To install for development:

   $ make install-dev

Windows:

If you use make, follow the steps above. Else, you need to download ffmpeg for your system, then:

  • Unzip the archive to a specified directory. e.g.: C:\libs\ffmpeg.

  • Add ffmpeg to your PATH

    setx path "%PATH%;C:\libs\ffmpeg\bin"

Launch

   $ ./ytd.py    # launch in interactive mode

Launch Options

Supported flags are explained below:

Command Function
ytd.py -o --playlist PLAYLIST_LINK Downloads the entire playlist in the cwd.
ytd.py -o --playlist PLAYLIST_LINK --playlist-start song_Number<br/>ytd.py -o --playlist PLAYLIST_LINK --ps Song_Number Downloads the entire playlist in the cwd from the specified song serial number in the playlist.
ytd.py -o --playlist PLAYLIST_LINK --playlist-end Song_Number<br/>ytd.py -o --playlist PLAYLIST_LINK --pe song_Number Downloads the playlist in the cwd and stops downloading when it reaches the mentioned song number.
ytd.py -o --playlist PLAYLIST_LINK --playlist-items song_Number-1, Song_Number-2, ..., Song_Number-x<br/>ytd.py -o --playlist PLAYLIST_LINK --pi song_Number-1, Song_Number-2, ..., Song_Number-x Downloads the songs at the positions of the mentioned serial numbers.
ytd.py -o --playlist PLAYLIST_LINK --default Downloads the playlist at the default location, the Downloads folder initially.
ytd.py -o --playlist PLAYLIST_LINK --default/Folder_Name Sets a new download location and downloads the playlist there.

You can use multiple arguments as well, for example, :-

Command Function
ytd.py -o --playlist PLAYLIST_LINK --playlist-end Song_Number --playlist-start song_Number --default/Folder_Location Downloads the playlist from the start song number to the end song number at the newly assigned download path.

Argument Explanation :-

  1. -o or --output:-  Define the output location for the current session.

  2. --video or -v :- Downloads the video.

  3. --playlist :- Playlist URL.

  4. --playlist-start or -ps : Define the starting point of the playlist.

  5. --playlist-end or -pe :- Define the end point of the playlist.

  6. --playlist-items or -pi :- This command downloads the songs at the mentioned serial numbers.

  7. --default :- Define the default download location.

About

A Youtube mp3 downloader in less than 70 lines of code


Languages

Language:Python 79.6%Language:Makefile 20.4%