$ brew install libav
$ sudo apt-get install libav-tools
$ git clone https://github.com/kalbhor/MusicTools
$ cd MusicTools
$ python setup.py install
$ pip install musictools
musictools.get_song_urls(song_name)
musictools.download_song(song_url, song_title)
Provides artist name, song name, album name and album art for a particular song. Requires Client ID and Client Secret for Spotify API
musictools.get_metadata(file_name, client_id, client_secret)
musictools.add_albumart(file_name, albumart)
musictools.add_metadata(file_name, title, artist, album)
musictools.revert_metadata(file_name)
musictools.get_current_metadata_tag(file_name, tag)
>>> from musictools import musictools
>>> songs_list = musictools.get_song_urls("Hey Jude")
>>> print(songs_list[0])
('https://www.youtube.com/watch?v=A_MjCqQoLLA', 'The Beatles - Hey Jude')
>>> url, title = songs_list[0]
>>> print(url)
https://www.youtube.com/watch?v=A_MjCqQoLLA
>>> print(title)
The Beatles - Hey Jude
>>> musictools.download_song(url, title, dl_directory='~/Desktop/Music/')
>>> musictools.get_metadata(title)
('The Beatles', '1 (Remastered)', 'Hey Jude - Remastered 2015', 'https://i.scdn.co/image/9ecfdf528562cae879748b73bd81b64dfa3d5704')
>>> artist, album , song_name, albumart = musictools.get_metadata(title, 'YOUR_CLIENT_ID', 'YOUR_CLIENT_SECRET')
>>> musictools.add_albumart(title, albumart)
>>> musictools.add_metadata(title, song_name, artist, album)
✨✨VOILA✨✨
To contribute, post issues without hesitation and open pull requests to add/improve features.