jaychen35 / spotify-to-mp3-python Goto Github PK
View Code? Open in Web Editor NEWThe simplest way to convert/download your Spotify playlist into MP3 files, using Python 3.
The simplest way to convert/download your Spotify playlist into MP3 files, using Python 3.
Hey @JayChen35, I'm still experiencing the issue. Any thoughts as to why?
Playlist URI (excluding "spotify:playlist:"): 6PECGhMPyi4ZsGr8QmqOVE
/Users/J/Dev/spotify-to-mp3-python/spotify_to_mp3.py:14: DeprecationWarning: You're using 'as_dict = True'.get_access_token will return the token string directly in future versions. Please adjust your code accordingly, or use get_cached_token instead.
token = credentials.get_access_token()
HTTP Error for GET to https://api.spotify.com/v1/playlists/6PECGhMPyi4ZsGr8QmqOVE returned 400 due to Only valid bearer authentication supported
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/spotipy/client.py", line 245, in _internal_call
response.raise_for_status()
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.spotify.com/v1/playlists/6PECGhMPyi4ZsGr8QmqOVE?fields=tracks%2Cnext%2Cname&additional_types=track
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/J/Dev/spotify-to-mp3-python/spotify_to_mp3.py", line 105, in <module>
playlist_name = write_playlist(username, playlist_uri)
File "/Users/J/Dev/spotify-to-mp3-python/spotify_to_mp3.py", line 49, in write_playlist
results = spotify.user_playlist(username, playlist_id, fields='tracks,next,name')
File "/usr/local/lib/python3.9/site-packages/spotipy/client.py", line 715, in user_playlist
return self.playlist(playlist_id, fields=fields, market=market)
File "/usr/local/lib/python3.9/site-packages/spotipy/client.py", line 611, in playlist
return self._get(
File "/usr/local/lib/python3.9/site-packages/spotipy/client.py", line 291, in _get
return self._internal_call("GET", url, payload, kwargs)
File "/usr/local/lib/python3.9/site-packages/spotipy/client.py", line 261, in _internal_call
raise SpotifyException(
spotipy.exceptions.SpotifyException: http status: 400, code:-1 - https://api.spotify.com/v1/playlists/6PECGhMPyi4ZsGr8QmqOVE?fields=tracks%2Cnext%2Cname&additional_types=track:
Only valid bearer authentication supported, reason: None
Hello,
I cloned your code and tried it, thanks a lot by the way,
but I get this error:
HTTP Error for GET to https://api.spotify.com/v1/playlists/8acf5c4e7b0f4c64 returned 400 due to Only valid bearer authentication supported
Would you know by any chance what it means? I have premium account with Spotify, I created the app and input the client ID, secrets and username as requested.
" ffprobe and ffmpeg not found. "
"PostProcessingError('ffprobe and ffmpeg not found. Please install or provide the path using --ffmpeg-location')"
Hey! I'm not sure why it's bringing this message up... I installed all the packages successfully on my terminal and in PyCharm as well.
It only downloads the .txt file and .webm file, no .mp3...
Let me know if you know how to fix this!! thank you!
The code used to run a couple of months ago, but when I return, I get error 403. When I run it, it starts downloading the YouTube URL data, then I get many errors. The program still makes the folder at the end, except there are .webm.ytdl files rather than MP3.
I tried to run this and here's the error i got:
spotify_to_mp3.py:14: DeprecationWarning: You're using 'as_dict = True'.get_access_token will return the token string directly in future versions. Please adjust your code accordingly, or use get_cached_token instead.
token = credentials.get_access_token()
HTTP Error for GET to https://api.spotify.com/v1/playlists/1KvRs5rFnFv2gHDkD91bSz returned 400 due to Only valid bearer authentication supported
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/spotipy/client.py", line 245, in _internal_call
response.raise_for_status()
File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.spotify.com/v1/playlists/1KvRs5rFnFv2gHDkD91bSz?fields=tracks%2Cnext%2Cname&additional_types=track
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "spotify_to_mp3.py", line 107, in <module>
playlist_name = write_playlist(username, playlist_uri)
File "spotify_to_mp3.py", line 49, in write_playlist
results = spotify.user_playlist(username, playlist_id, fields='tracks,next,name')
File "/usr/local/lib/python3.7/dist-packages/spotipy/client.py", line 715, in user_playlist
return self.playlist(playlist_id, fields=fields, market=market)
File "/usr/local/lib/python3.7/dist-packages/spotipy/client.py", line 615, in playlist
additional_types=",".join(additional_types),
File "/usr/local/lib/python3.7/dist-packages/spotipy/client.py", line 291, in _get
return self._internal_call("GET", url, payload, kwargs)
File "/usr/local/lib/python3.7/dist-packages/spotipy/client.py", line 266, in _internal_call
headers=response.headers,
spotipy.exceptions.SpotifyException: http status: 400, code:-1 - https://api.spotify.com/v1/playlists/1KvRs5rFnFv2gHDkD91bSz?fields=tracks%2Cnext%2Cname&additional_types=track:
Only valid bearer authentication supported, reason: None
spotify-to-mp3-python/spotify_to_mp3.py
Line 70 in c9ac581
In "Read me" you say: "When inputting this into the script, make sure to only input the characters after "spotify:playlist:". ", but I'm not sure where I have to input the URI or what to do with my Client ID or my Client Secret.
Also if I run the script "python3 spotify_to_mp3.py" I get this:
Traceback (most recent call last):
File "/home/Lorenzo/spotify-to-mp3-python/spotify_to_mp3.py", line 7, in
import yt_dlp
ModuleNotFoundError: No module named ' yt_dlp '
Also as you can tell I don't know much about python, but I'm trying to get into it.
If you could help that would be much appreciated and I appreciate a lot what you do!
Where in the world does this even put the files? I'm happy to delete the text file, but I can't figure out where it lives (and as a result, where the music will live, apparently).
Nevermid. I SWEAR I looked in that folder and saw nothing. And now it's there. Carry on.
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.