mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-10-29 18:00:15 +00:00
Release 0.1
This commit is contained in:
8
LICENSE.txt
Normal file
8
LICENSE.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
Copyright (c) 2016 Ritiek
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
55
README.md
55
README.md
@@ -2,65 +2,46 @@
|
|||||||
|
|
||||||
My first GitHub Repository (sorry for any mistakes)
|
My first GitHub Repository (sorry for any mistakes)
|
||||||
|
|
||||||
This python script allows downloading songs instantly by just entering the name of the song
|
This python script allows downloading songs from youtube by just entering the name of the song
|
||||||
and the artist.
|
and the artist in mp3 extension.
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Dependencies:
|
# Dependencies:
|
||||||
|
|
||||||
```
|
```
|
||||||
pip install mechanize
|
pip install mechanize
|
||||||
pip install bs4
|
pip install bs4
|
||||||
pip install pafy
|
pip install pafy
|
||||||
```
|
```
|
||||||
[OPTIONAL] If you want to convert downloaded music to mp3 (from m4a) install avconv for linux or ffmpeg from https://ffmpeg.zeranoe.com/builds/ for windows and then place the ffmpeg.exe in your script folder:
|
|
||||||
```
|
```
|
||||||
sudo apt-get install libav-tools
|
sudo apt-get install ffmpeg
|
||||||
or download from https://libav.org/download/ for windows
|
or download from https://ffmpeg.zeranoe.com/builds/ for windows and place the ffmpeg.exe in your script folder
|
||||||
```
|
```
|
||||||
|
|
||||||
## Installation & Usage:
|
# Installation & Usage:
|
||||||
```
|
```
|
||||||
git clone https://github.com/Ritiek/YTMusic
|
git clone https://github.com/Ritiek/YTMusic
|
||||||
cd YTMusic
|
cd YTMusic
|
||||||
sudo python setup.py install
|
sudo python YTMusic.py
|
||||||
```
|
|
||||||
or you can also install from pypi using:
|
|
||||||
```
|
|
||||||
pip install YTMusic
|
|
||||||
```
|
|
||||||
Run it using:
|
|
||||||
```
|
|
||||||
YTMusic
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Commands that can be used in the Script:
|
# Commands that can be used in the script:
|
||||||
```
|
```
|
||||||
• play - will play the last song downloaded using default music player
|
2. play - will play the last song downloaded using default music player
|
||||||
• spotify - downloads songs from spotify playlist (see below:)
|
3. gg - exit the script
|
||||||
• convert - will convert all your m4a songs into mp3
|
4. spotify - downloads songs from spotify playlist (see below:)
|
||||||
• exit - exit the script
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Downloading Music from Spotify:
|
# Downloading Music from Spotify:
|
||||||
|
|
||||||

|
1. To download music from spotify playlists goto http://www.playlist-converter.net/ and login to your
|
||||||
|
|
||||||
• To download music from spotify playlists goto http://www.playlist-converter.net/ and login to your
|
|
||||||
spotify account and choose the playlist you want to download. Let it grab the tracks and then click
|
spotify account and choose the playlist you want to download. Let it grab the tracks and then click
|
||||||
on ```Export to free text```.
|
on ```Export to free text```.
|
||||||
|
2. Copy the songs list and create a new text file ```spotify.txt``` in your Music directory and paste the
|
||||||
• Copy the songs list and create a new text file ```spotify.txt``` in your Music directory and paste the
|
|
||||||
songs list.
|
songs list.
|
||||||
```
|
3. Use the command ```spotify``` in the script to start downloading the list.
|
||||||
cd YTMusic/Music
|
|
||||||
sudo nano spotify.txt
|
|
||||||
[paste your songs here then ctrl+o, enter, ctrl+x]
|
|
||||||
sudo chmod 775 spotify.txt
|
|
||||||
```
|
|
||||||
• Use the command ```spotify``` in the script to start downloading the list.
|
|
||||||
|
|
||||||
## Disclaimer:
|
# Known bugs:
|
||||||
|
|
||||||
Downloading Copyright Music may be illegal in your country. Please support the artists by buying their Music.
|
1. Fails to download songs containing accents (that is, characters like 'Ø' in song like 'BØRNS Seeing Stars')
|
||||||
|
in the Youtube's video title.
|
||||||
|
|||||||
12
YT_Music.egg-info/PKG-INFO
Normal file
12
YT_Music.egg-info/PKG-INFO
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Metadata-Version: 1.1
|
||||||
|
Name: YT-Music
|
||||||
|
Version: 0.1
|
||||||
|
Summary: Downloads Songs and Spotify playlists.
|
||||||
|
Home-page: https://www.github.com/Ritiek/YTMusic/
|
||||||
|
Author: Ritiek Malhotra
|
||||||
|
Author-email: ritiekmalhotra123@gmail.com
|
||||||
|
License: UNKNOWN
|
||||||
|
Download-URL: https://github.com/Ritiek/YTMusic/tarball/0.1
|
||||||
|
Description: UNKNOWN
|
||||||
|
Keywords: download,songs,spotify,playlists,music
|
||||||
|
Platform: UNKNOWN
|
||||||
7
YT_Music.egg-info/SOURCES.txt
Normal file
7
YT_Music.egg-info/SOURCES.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
setup.cfg
|
||||||
|
setup.py
|
||||||
|
YT_Music.egg-info/PKG-INFO
|
||||||
|
YT_Music.egg-info/SOURCES.txt
|
||||||
|
YT_Music.egg-info/dependency_links.txt
|
||||||
|
YT_Music.egg-info/top_level.txt
|
||||||
|
bin/YTMusic
|
||||||
1
YT_Music.egg-info/dependency_links.txt
Normal file
1
YT_Music.egg-info/dependency_links.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
1
YT_Music.egg-info/top_level.txt
Normal file
1
YT_Music.egg-info/top_level.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -13,15 +13,15 @@ avconv = 1
|
|||||||
|
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
opsys = 'win'
|
opsys = 'win'
|
||||||
if not os.path.isfile('ffmpeg.exe'):
|
if not os.path.isfile('avconv.exe'):
|
||||||
print 'avconv not found, will not convert to mp3 (from m4a)'
|
print 'avconv not found, will not convert to mp3 (from m4a). download from https://builds.libav.org/windows/ to be able to convert them'
|
||||||
avconv = 0
|
avconv = 0
|
||||||
else:
|
else:
|
||||||
opsys = 'linux'
|
opsys = 'linux'
|
||||||
check_install = os.system('which avconv > /dev/null')
|
check_install = os.system('which avconv > /dev/null')
|
||||||
if check_install == '':
|
if check_install == '':
|
||||||
print 'avconv not found, will not convert to mp3 (from m4a). use sudo apt-get install libav-tools to install it'
|
print 'avconv not found, will not convert to mp3 (from m4a). use sudo apt-get install libav-tools to install it'
|
||||||
avonv = 0
|
avconv = 0
|
||||||
|
|
||||||
def Main():
|
def Main():
|
||||||
script_dir = os.getcwd()
|
script_dir = os.getcwd()
|
||||||
@@ -49,7 +49,27 @@ def Main():
|
|||||||
else:
|
else:
|
||||||
print 'No log to read from..'
|
print 'No log to read from..'
|
||||||
elif raw_song == "convert":
|
elif raw_song == "convert":
|
||||||
|
|
||||||
print ''
|
print ''
|
||||||
|
if opsys == 'win':
|
||||||
|
if avconv == 1:
|
||||||
|
y = 1
|
||||||
|
x = 0
|
||||||
|
for m in os.listdir(script_dir + '/Music/'):
|
||||||
|
if m.endswith(".m4a"):
|
||||||
|
x = x + 1
|
||||||
|
print 'Total songs to convert = ' + str(x) + ' songs'
|
||||||
|
for m in os.listdir(script_dir + '/Music/'):
|
||||||
|
if m.endswith(".m4a"):
|
||||||
|
print ''
|
||||||
|
print str(y) + '. ' 'Converting ' + m + ' to mp3..'
|
||||||
|
y = y + 1
|
||||||
|
song = m.replace(".m4a", "")
|
||||||
|
os.system('avconv.exe -loglevel 0 -i "Music\\' + song + '.m4a" ' + '"Music\\' + song + '.mp3"')
|
||||||
|
os.remove("Music/" + m)
|
||||||
|
else:
|
||||||
|
print 'avconv is not installed, cant convert to mp3'
|
||||||
|
elif opsys == 'linux':
|
||||||
if avconv == 1:
|
if avconv == 1:
|
||||||
y = 1
|
y = 1
|
||||||
x = 0
|
x = 0
|
||||||
|
|||||||
BIN
dist/YTMusic-0.1-py2.7.egg
vendored
BIN
dist/YTMusic-0.1-py2.7.egg
vendored
Binary file not shown.
BIN
dist/YTMusic-0.1.tar.gz
vendored
Normal file
BIN
dist/YTMusic-0.1.tar.gz
vendored
Normal file
Binary file not shown.
BIN
dist/YT_Music-0.1.tar.gz
vendored
Normal file
BIN
dist/YT_Music-0.1.tar.gz
vendored
Normal file
Binary file not shown.
9
setup.py
9
setup.py
@@ -8,11 +8,14 @@ if sys.version_info > (3,0):
|
|||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
setup(name='YTMusic',
|
setup(name='YT_Music',
|
||||||
version='0.1',
|
version='0.1',
|
||||||
description='Download songs just by entering the song name and artist.',
|
description='Downloads Songs and Spotify playlists.',
|
||||||
author='Ritiek Malhotra',
|
author='Ritiek Malhotra',
|
||||||
author_email='ritiekmalhotra123@gmail.com',
|
author_email='ritiekmalhotra123@gmail.com',
|
||||||
url='https://www.github.com/Ritiek/YTMusic/',
|
|
||||||
scripts=['bin/YTMusic'],
|
scripts=['bin/YTMusic'],
|
||||||
|
url='https://www.github.com/Ritiek/YTMusic/',
|
||||||
|
download_url = 'https://github.com/Ritiek/YTMusic/tarball/0.1',
|
||||||
|
keywords = ['download', 'songs', 'spotify', 'playlists', 'music'],
|
||||||
|
classifiers = [],
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user