Code Monkey home page Code Monkey logo

pyutube's Introduction

๐Ÿ“น YouTube Downloader CLI

Enjoying my project? Please show your appreciation by starring it on GitHub! โญ

Version Downloads

Note

Have a new feature? Please don't hesitate to tell me!

Pyutube

๐Ÿ““ Description

This command-line tool downloads YouTube videos from the Terminal, written under Pytube, and offers a user-friendly interface.

it is cross-platform (Windows, Mac, Linux) and can be used in any terminal.

๐Ÿค” why pyutube?

While other tools offer many features and configurability, pyutube simplifies the process, with no need to dive into complex configurations and documentation, such as identifying specific options for downloading audio-only, or how to download a specific resolution, but on pyutube just paste the URL and that's it, it will guide you through the process ๐Ÿ”ฅ.

๐Ÿ› ๏ธ Installation

it is easy to install Pyutube, make sure that you have Python installed. To check if you have it installed, type python --version in your terminal. You should see something like Python 3. x otherwise, download and install it from Python.

after that, you can install it with the following command:

pip install pyutube

๐Ÿ“ˆ Upgrade

All the latest updates will be posted on GitHub, you can also upgrade the tool via PyPI with this command:

pip install --upgrade pyutube

Then you can use it in your Terminal ๐Ÿฅณ.

๐Ÿฆธ Quick Start

Pyutube is very easy to use, here are examples of its uses:

pyutube YOUTUBE_LINK [PATH]

[!NOTE] > [PATH] is an optional input, the default value is the terminal path where the CLI is running (the current working directory in your terminal).

๐Ÿ‘จโ€๐Ÿ’ป Usage

Arguments

Arguments Description
URL The URL of the YouTube video. This argument is [Required].
PATH The path to save the video. Defaults to the current working directory. [Optional]

Options

Option Description
-v or --version Show the version number.
-a or --audio Download only audio immediately without asking (video or audio).
-f or --footage Download only video immediately without asking (video or audio).

๐Ÿ•ต๏ธโ€โ™‚๏ธ Examples

- Show version:

pyutube -v

- Download playlists:

  1. pyutube <YOUTUBE_PLAYLIST_LINK | PLAYLIST_ID> [the_download_path*]

Note

Don't forget, the path is optional.

  1. Then choose the format of the download, video or audio.
  2. Choose the resolution if it is a video you want to download, otherwise, choose audio and it will download it all immediately ๐Ÿ”ฅ.

Note

It will check all resolutions available in the first video in the playlist, then it will download all of them in the same resolution ๐Ÿ‘.

- Download shorts, videos, or audio:

  1. pyutube <YOUTUBE_LINK | VIDEO_ID | SHORT_LINK> [the_download_path*]

Note

Don't forget, the path is optional.

  1. Then choose the format of the download, video or audio.
  2. Choose the resolution if it is a video you want to download, otherwise, choose audio and it will download it immediately ๐Ÿ”ฅ.
pyutube cMPnY7EuZvo
pyutube youtu.be/cMPnY7EuZvo
pyutube https://youtube.com/watch?v=cMPnY7EuZvo

- Download audio immediately:

  1. pyutube <YOUTUBE_LINK | VIDEO_ID | SHORT_LINK> [the_download_path*] -a
pyutube cMPnY7EuZvo -a

or

pyutube -a youtu.be/cMPnY7EuZvo

and that's it ๐ŸŽ‰.

- Download videos immediately:

  1. pyutube <YOUTUBE_LINK | VIDEO_ID | SHORT_LINK> [the_download_path*] -f
  2. Choose the resolution.
pyutube cMPnY7EuZvo -f

or

pyutube -f youtu.be/cMPnY7EuZvo

see the video and relax ๐ŸŽ‰.

๐Ÿ“ธ Screenshots

Download video with specify the save location

Download video with specify the save location

Chose what type you want to download

Chose what type you want to download

Chose what what resolution you want to download(if the type is video)

Chose what resolution you want to download

If you download a playlist, you can choose what video you want to download, or even all of them

If you download a playlist, you can choose what video you want to download, or even all of them



Do not know how to use it? just type pyutube --help

image5

๐Ÿฅฐ Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you want to change. please follow the contributing guidelines

๐Ÿ“Ž License

This project is licensed under the MIT License.

pyutube's People

Contributors

hetari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pyutube's Issues

[FEATURE REQUEST] filename template

pyutube already saves files as name - resolution.extension.
A template for it might be %name% - %resolution%.%ext% or maybe some other format.
Then more fields: video ID, channel owner, playlist ID etc.

Then one could achieve same filename layout as with certain another popular video downloader:
%name% [%id%].%ext%

I personally find video ID in filename very helpful

default path to save video - current dir

> cd /tmp
> pyutube --help
...
โ”‚      path      [PATH]  Path to save video [default: /tmp]
...
> cd /
> pyutube --help
...
โ”‚      path      [PATH]  Path to save video [default: /]
...

Different and confusing output.
A user might mistake the dir they are current in for a dir downloads always go to.
It should not print the value of current dir, but say "current directory" or maybe ..

โ”‚      path      [PATH]  Path to save video [default: <current directory>]
โ”‚      path      [PATH]  Path to save video [default: .]

resolutions issue

pyutube youtu.be/cMPnY7EuZvo
The video has variants up to 480p on youtube.
But pyutube offers also 720p and 1080p:

[?] Choose the resolution you want to download: 
   144p
   240p
   360p
   480p
 > 720p
   1080p
   Cancel the download

I selected 720p. pyutube downloaded 360p.
I removed the file and run pyutube again, selecting 480p. pyutube downloaded 360p.
I removed the file and run pyutube again, selecting 144p. pyutube downloaded 360p.

Expectations:

  • only available resolutions are listed
  • in case of mismatch, pyutube exits with an error instead of downloading another resolution
  • in case resolution is available, it downloads it instead of 360p

resolutions issue - episode 2

I am afraid #3 has been fixed only partially.
With release 1.1.2, only 360p is offered, others are not in the list, even though the video on youtube has 144p, 240p and 480p.

[?] Choose the resolution you want to download:                                                              
   360p                                                                                                      
 > Cancel the download

unsolicited download

> pyutube
๐ŸŒ  Checking internet connectionresult=<Response [200]>
โœ… There is internet connection

[?] Choose the file type you want to download: 
 > Audio
   Video
   Cancel the download

downloads Fast Whoosh Sound Effect - audio.mp3 which wasn't asked for.
I expected pyutube to either prompt for a link or exit saying "provide a link"


Also, result=<Response [200]> is perhaps superfluous in ๐ŸŒ Checking internet connectionresult=<Response [200]>

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.