Coder Social home page Coder Social logo

song-downloader's Introduction

song-downloader

A Python Script to download songs in the best available format from Youtube. Haven't tested it in a Windows machine. So, it would be nice if somebody could do it. As of now, it works with command line arguments. Why? No apparent reason, other than that it is more convinient for me. Just provide the song names after the program name, in quotes.
python downloader.py "<Song1>" "<Song2>" ... or
python downloader.py -i <filename>
where filename contains a list of song names

Dependancies

  • urllib: Install urllib module with pip3 with this command
    pip3 install urllib
  • BeautifulSoup: Install BeautifulSoup4 with
    pip3 install beautifulsoup4
  • youtube-dl: Install youtube-dl with
    pip3 install youtube_dl

How to Use

  • First time users please check the next section.
  • Download the downloader.py file to your system.
  • Open the terminal and into the directory where the you saved the file.
  • Run this command:
    python3 downloader.py <songname>
  • Enjoy ;)

First Time Use

  • Before using the program, open it with a text editor.
  • Change ~/Music/ to the path where you want the downloaded songs to be saved. And do leave a trailing '/' character.
  • Example: If you want them to be saved at ~/Music folder, then line 6 should look like this:
    pathToSave = "~/Music/"
    and not
    pathToSave = "~/Music"
  • You're good to go. Refer How to Use if there's any issue.

song-downloader's People

Contributors

rwithik avatar

Stargazers

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

Watchers

 avatar

song-downloader's Issues

Suggestion: Replace titleCase function with code below

def titleCase(str):

'''
A function to convert the given song name to title case.
'''
words = []
for word in str.split():
    if word not in ['in', 'the', 'for', 'of', 'a', 'at', 'an', 'is', 'and']:
        words.append(word.capitalize())
    else:
        words.append(word)
return ' '.join(words)

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.