robbeofficial / spotifyripper Goto Github PK
View Code? Open in Web Editor NEWsmall ripper script for spotify (rips playlists to mp3 and includes ID3 tags and album covers)
small ripper script for spotify (rips playlists to mp3 and includes ID3 tags and album covers)
spotify:track:1jBcfkNUcPzMGYKgGKVoKE
Will lead to:
Loading track...
Loaded track: Big Fun - Original 12" Mix
ripping Big Fun - Original 12" Mix.mp3 ...Playing
/bin/sh: 1: Syntax error: Unterminated quoted string
.Traceback (most recent call last):
File "./jbripper.py", line 142, in
ripper.connect()
File "/usr/local/lib/python2.7/dist-packages/spotify/manager/session.py", line 81, in connect
self.loop(self.session) # returns on logged out
File "/usr/local/lib/python2.7/dist-packages/spotify/manager/session.py", line 97, in loop
session, *message['args'])
File "./jbripper.py", line 128, in music_delivery_safe
rip(session, frames, frame_size, num_frames, sample_type, sample_rate, channels)
File "./jbripper.py", line 46, in rip
pipe.write(frames);
IOError: [Errno 32] Broken pipe
^C
Processing this specific URI, I will always get an "IOError: [Errno 32] Broken Pipe":
spotify:track:1uFiJH3Z6hlmLmZZRbJR3F
I first thought it could be because of this Unicode char å in the title but processing another URI like spotify:track:0m0bUigqixm0yCfujB9gqf with the same char in the title works.
I can't explain this behaviour.
Spotifyripper cancel its process (Track not availble)
Have you for this issue any suggestion to skipping unplayable tracks ?
Thanks
Robin
What is the license of this code?
What license applies to my modifications?
Any ideas?
Traceback (most recent call last):
File "./jbripper.py", line 6, in <module>
from jukebox import Jukebox, container_loaded
File "/Users/bruno/spotifyripper/jukebox.py", line 10, in <module>
from spotify import ArtistBrowser, Link, ToplistBrowser, SpotifyError
ImportError: cannot import name ToplistBrowser
When I try to run spotifyripper, I get the following error, although I installed all like in the readme.
Nothing helped in this #1 thread.
Traceback (most recent call last):
File "./jbripper.py", line 5, in <module>
from spotify import Link, Image
ImportError: No module named spotify
What can I do?
Version:
Linux version 3.16.0-38-generic (buildd@allspice) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015
since lilspotify has been deprecated and is no longer downloadable (along with the app key) is there any plan to update this tool? it's so useful
In the code you're calling eyeD3 with -Q parameter. At least on my machine the -Q flag is not available and eyeD3 won't execute properly. Result: no album art, etc.
Remove -Q flag (no idea what this should do as I even didn't find it in the man page) and the code works.
cmd = "eyeD3" +
" --add-image cover.jpg:FRONT_COVER" +
" -t "" + title + """ +
" -a "" + artist + """ +
" -A "" + album + """ +
" -n " + str(num_track) +
" -Y " + str(year) +
" -Q " +
" "" + directory + mp3file + """
shell(cmd)
Here is my install history, cleaned up and documented for howto/wiki/readme purposes.
Installed on Debian 6.0 Linux 2.6.32-5-686 i686 GNU/Linux
# Go home!
cd ~
# Install libspotify
wget https://developer.spotify.com/download/libspotify/libspotify-12.1.51-Linux-i686-release.tar.gz
tar vzxf libspotify-12.1.51-Linux-i686-release.tar.gz
cd libspotify-12.1.51-Linux-i686-release/
sudo make install prefix=/usr/local
cd ..
# Fetch spotifyripper
wget https://github.com/robbeofficial/spotifyripper/archive/master.zip
unzip master.zip
# Install pyspotify-dev
wget https://github.com/mopidy/pyspotify/tarball/develop#egg=pyspotify-dev
tar vzxf develop
# Install mopidy apt source
wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/mopidy.list
# Copy the jukebox dependency
cd spotifyripper-master/
cp ../mopidy-pyspotify-ef75737/examples/jukebox.py .
mv /YOUR/PATH/TO/spotify_appkey.key .
cd ..
# Install dependencies and tools: SEE NOTE BELOW
sudo apt-get update
sudo apt-get install mopidy python-spotify lame eyed3
# Let it rip
cd spotifyripper-master/
screen ./jbripper.py <username> <password> <playlist|track>
# NOTES:
# - eye3d (0.6.18-1) from APT is incompatible
Hi,
no issue but a very simply feature request. I'd like that the downloaded files are put in a subfolder instead of "throwing" them all into the folder where the python code lies.
Simply change
directory = os.getcwd() + "/" + track.artists()[0].name() + "/" + track.album().name() + "/"
to something like
directory = os.getcwd() + "/downloaded/" + track.artists()[0].name() + "/" + track.album().name() + "/"
The ripping does not work with utf8 chars in the titles names like:
spotify:track:5szGZic8oCtJfbmDlBpPBG
spotify:track:3FKWz6BvxV0W8t7ykdzzTP
This is also not fixed in @AndersTornkvist #4 or his fork (But atleast skipped).
steps to reproduce:
execute the following command:
$ LD_LIBRARY_PATH=/usr/local/lib/ PYTHONPATH=/usr/lib/python2.7/site-packages python2 ./jbripper.py user passwd spotify:track:7y2YUIyCuVhBidENVT0068
This generates the following error:
[...]
Loading track...
Loaded track: Love Me Like You Do - From "Fifty Shades Of Grey"
ripping Love Me Like You Do - From "Fifty Shades Of Grey".mp3 ...Playing
lame: excess arg Shades
.Traceback (most recent call last):
File "./jbripper.py", line 152, in <module>
ripper.connect()
File "/usr/lib/python2.7/site-packages/spotify/manager/session.py", line 81, in connect
self.loop(self.session) # returns on logged out
File "/usr/lib/python2.7/site-packages/spotify/manager/session.py", line 97, in loop
session, *message['args'])
File "./jbripper.py", line 138, in music_delivery_safe
rip(session, frames, frame_size, num_frames, sample_type, sample_rate, channels)
File "./jbripper.py", line 54, in rip
pipe.write(frames);
IOError: [Errno 32] Broken pipe
It only happens for tracks with quotes in its names.
I work once i had to abort it and then it won't work again.
Sorry wrong github here, just ignore
even if it supposed that spotify streams at 320, my files bitrate are around 268.
Hi, i'm getting this weird issue where the playlist would rip every second file (rips the first, the 2nd file would attempt but generates a 14kb file, rips the 3rd time, 4th file would generate a 14kb file, repeat).
I'm not quite sure if its the modules installed or if its something on this.
Hey,
Just wondering if you have any suggestions on how to get this to work if your Spotify account is authenticated with Facebook. I can't create a Spotify account with the email I'm already using for this account, and I can't reset my password because it says i'm authenticated with Facebook.
Any suggestions?
Looks like the changes in pyspotify 2 have broken this, just a heads up for when pypi eventually updates :)
Can i download saved tracks too ?
https://play.spotify.com/collection/songs
The birate selected to retrieve spotify stream is set to 96kbps, not according to the comment:
self.session.set_preferred_bitrate(2) # 320 bps
2 is 96
0 is 160
1 is 320 kbps
source : https://developer.spotify.com/docs/libspotify/11.1.60/group__session.html
Hi,
is there a installation instruction for windows? or ubuntu 12.04? the old one doesnt work
Am I right to say that since Libspotify is deprecated by Spotify, this no longer works?
in run
self.ripper.load_track(track)
File "/home/david/spotifyripper/jukebox.py", line 380, in load_track
print "Loaded track: %s" % track.name()
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 32: ordinal not in range(128)
Consider using UTF8, or a conversion table for illegal characters
For reference this is the tune: http://open.spotify.com/track/4OhB7UiZX5sQLrkF6guuEp
is it possible to get files in higher bitrate or other formats from the api?
I was ripping this album /album/2wfWqYWTrCifvbZt20rImU which oddly contains multiple same titled tracks, the script ends up overwriting tracks that are named the same(if they're in the same folder)
I ended up band aiding my own fix by appending a UUID to mp3file
in rip_init() ( although this breaks rip_id3() )
A proper fix would be something like appending the track number or something else unique(that isn't gibberish)
Logging in, please wait...
Logged in!
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "./jbripper.py", line 101, in run
link = Link.from_string(sys.argv[3])
SpotifyError: Failed to get link from a Spotify URI
it would be nice to have a option when downloading a complete playlist
that it all songs will be downloading in one map called after the playlist
when trying to download song spotify:track/0Ug6x0wl0Sjmombbtckutr
i get the following error
Logging in, please wait...
Logged in!
Loading track...
Loaded track: A Brand New Day - The Wiz/Soundtrack Version
ripping A Brand New Day - The Wiz/Soundtrack Version.mp3 ...Playing
Can't init outfile '/home/klm21904/Workspace/spotifyripper/Diana Ross/The Wiz/A Brand New Day - The Wiz/Soundtrack Version.mp3'
.Traceback (most recent call last):
File "./jbripper.py", line 152, in <module>
ripper.connect()
File "/usr/local/lib/python2.7/dist-packages/spotify/manager/session.py", line 81, in connect
self.loop(self.session) # returns on logged out
File "/usr/local/lib/python2.7/dist-packages/spotify/manager/session.py", line 97, in loop
session, *message['args'])
File "./jbripper.py", line 138, in music_delivery_safe
rip(session, frames, frame_size, num_frames, sample_type, sample_rate, channels)
File "./jbripper.py", line 54, in rip
pipe.write(frames);
IOError: [Errno 32] Broken pipe
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.