Giter Site home page Giter Site logo

maharshi-pandya / youtube-downloader Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 71 KB

A python script which downloads YouTube video/audio from the CLI arguments itself.

License: GNU General Public License v3.0

Python 100.00%
youtube-video-downloader youtube python3 webscraping webproject

youtube-downloader's Introduction

YouTube Video Downloader

  • Download YouTube video(s)/audio(s) through the CLI
  • Pass in the VIDEO_URL as an argument with the -p path/to/save and the --onlyaudio option to download the only the audio, from the video, and save it in path/to/save
  • Helpful to download songs from YouTube (something which I do a lot)

Usage

NOTE
  • Before cloning this repo, make sure you have ffmpeg installed locally on your machine.
  • Also, make sure it is added to path.

Clone this repo locally

$ git clone https://github.com/Maharshi-Pandya/YouTube-Downloader.git
$ cd YouTube-Downloader
$ pip3 install -r requirements.txt

We have to pass in some arguments in the CLI for this to work

  • --onlyaudio or -q (--quality)
  • VIDEO_URL
  • -p (--path) path/to/save

Eg.

$ python3 app.py --onlyaudio -p <path/to/save> <YouTube_VIDEO_URL>

Downloads only the audio from the YouTube video URL specified

Also,

$ python3 app.py -q 360p -p <path/to/save> <YouTube_VIDEO_URL>

Downloads the video in 360p quality and saves it to path/to/save

Behind the scenes, when the video source URL contains no audio streams, this script fetches the video file, and its corresponding audio file. Using ffmpeg then, it adds the audio file to the video file

NOTE

In some of the YouTube videos (eg. videos of VEVO), their source urls are encrypted with some signature cipher. The source urls cannot be fetched without getting the signature from the cipher. (YouTube constantly changes the algorithm in their JS files).

Currently, this YouTube-Downloader doesnot support that.

And it gives out this error

::-> Fetching the video data
::-> Extracted video information
::-> Detected signature ciphers in the video data
Error: Unable to start the download

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.