Code Monkey home page Code Monkey logo

youtube-downloader's Introduction

youtube-downloader

download all your favourite YouTube videos at once without using Url's

usage:

python downloader.py -h for help

python downloader.py -u -d

you have to use either -u or -d (only one)

  • -u (means url) you can input next to it the url or name of the video that you want to download
  • -d (means directory) you can input the directory where the file which contains the names or/and url's of the video/s exist

technologies:

  • python
  • pytube library
  • youtube-search-python library
  • sys library
  • re library
  • csv library
  • argparse library

Implemetation

main function

it is responsible for controling the project's behaviours it gets the argv (user input via the cli) if directory mode is used it tries to get all data provided and appends it to a list and if an error raises it quits the system if is a url mode it adds the url to list then it downloads the list using download_videos function

get_argv function

it sets up argpaser system and it validates that that (-u and -d) are not both used or not used at the same time

download_videos function

accepts list as input which contains names or/and url's then for all videos: it checks wether this is a url or name if url it calls download_video_by_url else id calls download_video_by_name

download_video_by_url

it accepts url as a string as input it calls pytube to download video with the provided url if url doesn't exist it will not download

download_video_by_name

it accepts name of video as input it calls the youtube-search-python library and it gets video url finally it calls download_video_by_url passing the new url to be downlaoded

youtube-downloader's People

Contributors

houssemdegachi 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.