Replaced spotipy with a non-api library#2626
Replaced spotipy with a non-api library#2626TzurSoffer wants to merge 9 commits intospotDL:masterfrom
Conversation
|
I currently have a hardcoded variable in the Spotify.py file, but this should be a config option. I tried to make it a config option, but I am unfamiliar with this code and couldn't. |
…well as some minor issues in tracks)
|
Hey, is there any progress towards merging this PR? |
|
This branch works on my system |
|
@TzurSoffer Have you seen this? |
|
if you see that error, you didnt install my fork as it does not use api.spotify.com... |
4.4.5 I had too many pre-existing versions hanging around, was pointing back to the previous .local install. After removing everything spotdl related, reinstalled again from the fork, and its processing, without the error so far. Thanks! |
|
Works on my system! Thanks! |
|
works very well,thank you! |
|
I tried it with the "artist" option and it doesn't work, I don't know if I'm doing something wrong or not; I run the command on a linux headless server, I attached the command and the error here: Command: spotdl download artist:X --headless --output {artist}/{album}/{title}.{output-ext} --format m4a |
|
Artists are not yet supported, download a playlist with all his songs instead for now |
|
Thanks, it works pretty well! Just running into a couple errors at the moment (running this on mac):
|
|
@taco-mustard Please provide the commands as well as the output from the terminal so I can fix replicate it |
|
This was the code that led to the AttributeError This was the output Found 121 songs in dl_songs (Playlist)
AttributeError: 'Downloader' object has no attribute 'download_url' ``` |
|
@taco-mustard It possible that youtube is bugged, I dont have time to fix it rn. for now, you can do |
|
changing |
You are %100 right, fixed it and gave you credit. Thanks a lot! |
|
I am trying to use this programmatically as follows: spotdl = Spotdl(client_id=config['SPOTIFY_CLIENT_ID'], client_secret=config['SPOTIFY_CLIENT_SECRET'], downloader_settings={**config_file_options, 'output': os.path.join(config['SPOTIFY_DOWNLOAD_LOCATION'], '{artists} - {title}.{output-ext}')})This code was working for me before Spotify changed its API and I downloaded your fork. Now I'm getting the below error: |
Searching is broken, you have to use the url or id for now |
Ah gotcha, thanks for the help. Based on this, I had to make these changes to get it working
songs = spotdl.search(track_urls)
results = spotdl.download_songs(songs)I had to change it to this: songs = [Song.from_url(url) for url in track_urls]
results = spotdl.download_songs(songs)I suppose I should have been doing this from the beginning given that I already had the track URLs, but I incorrectly assumed searching with the urls would just do this under the hood. |
|
Searching should now work. If it doesn't, please update SpotipyFree |
Gr3gory
left a comment
There was a problem hiding this comment.
It works!
(macOS brewed-python installation)
|
hopefully this will be merged soon |
|
how do i run this version? the uv run build actually crashes |
|
|
|
it do installs the packages but nothing run |
|
Do |
|
oh got it. |
|
Seems to work well with spotify playlist links.
|
|
It did not work using pip install for me, however, cloning the forked repo and building with uv did work for me (also after upgrading yt-dlp version). My configurationCommand (with uv environment active)
Spotify environment
System specs
|
|
When attempting to install your version I am now getting this; |
|
Either install git or download the repo as zip, unzip it, and run |
|
My apologies for so many comments, still learning this. When I install your thread and run python -m spotdl I get this right afterwards, no downloads; Traceback (most recent call last): |
|
You probably need to install |
|
Is this not doable on android with termux since the phone isn't rooted? |
|
Idk, never tested it |
|
It seems like this is only working on computers and will not work on termux for android. If anyone has any fixes for that I'm all ears please |
|
Is there anyway to get the lyrics attached into the mp3 file like the way original spotdl does it? |
I am not aware of my app changing anything about the lyrics. |
Title
Due to recent changes in Spotify, the api is no longer useful to non-premium users, therfore I have replaced it.
Description
I have made a wrapper to spotAPI, which functions as a drag-n-drop replacement to spotipy, it not perfect, but it has fixed spotdl.
To install working verison run
pip install git+https://github.com/TzurSoffer/spotify-downloaderIf this helped you a star to my fork and bump would be appreciated to help promote this fix.
Related Issue
#2621
#2617
Motivation and Context
It solves the problem of the app not working without Spotify Premium.
How Has This Been Tested?
I have tested both playlists and individual songs.
Types of Changes
Checklist