-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overcoming "API rate limit exceeded" #6
Comments
Yes I think you're right that the easiest way to resolve this for now would be to use your own app To set up the app you need to:
Then you can use the
Update 30/11/20 Please replace |
That's brilliant! Den 2015-06-10 17:20, Howard Wilson skrev:
|
With a bit over a 100 playlists I hit the rate limit even with a client id for an own app. |
Yes, there will always be some upper playlist limit on the "bulk export" facility unfortunately. Ideas/PRs welcome. |
Maybe a multiple selection option is the easiest solution with the smallest amount of manual effort. Like a checkbox for each playlist which allows you to only export several at once. I can make that these days when I can spare some time. |
The Redirect URI isn't working... thoughts? https://rawgit.com/watsonbox/exportify/master/exportify.html. I get - INVALID_CLIENT: Invalid redirect URI |
@jshebetich You're right, I introduced a change which broke this. Fixed now plus a test to verify behavior. |
Dirty workaround adding a 500ms delay between API requests : https://gist.github.com/Alex131089/01611e017d874af51cb52ceefecc2d5d |
@watsonbox Exportify just won't work for me. Even when i just try individual playlist i never get an option to save is as CSV file, it just shows the whole text within the web page, and i can't find anyway to save it which means i can't use it. Any suggestions? |
Just used the "create an app" method, which worked perfectly with 141 playlists. Thanks! :) |
@Alex131089 care to writeup a quick blurb on exactly how you did it? Been trying to use your 'Dirty workaround' but haven't been able to figure it out.
|
@BrianRoach I set up a local server and used a "create an app" clientid (which wasn't enough by itself). Redirect URI should be correctly handled in latest exportify. I added my client URL 127.0.0.1 (http://127.0.0.1/, http://127.0.0.1/expotify.html) as allowed, got a token and started the export. Maybe you can use rawgit url directly (allowing the url). |
when you say you added your 'client URL 127.0.0.1 (http://127.0.0.1/, http://127.0.0.1/expotify.html) as allowed' what do you mean? Still learning here so please bare with me. |
@BrianRoach : I meant the redirect URI, as in #6 (comment), the URL Spotify will allow to get the token (the location of your exportify). |
Ah, I see. I had tried to enter http://localhost:8000/exportify.html. I'll try 127.0.0.1 and see if it works. |
Thank you watsonbox for this done-well app. |
Thanks Watsonbox for this! I was about to start writing something similar at my frustration over the Spotify UI and lack of flexibility and getting my artists into Songkick. I will continue to try incrementally higher values I suppose! :) |
Delay didn't help me but restricting the code to exporting 100-200 playlists at a time did |
I was unable to export my 127 playlists (1268 total tracks) even with my own developer token on the rawgit.com site, but running it locally let me download them. Hard to tell for sure if that was the important factor, though. |
Was able to successfully export individual playlists via the normal URL just fine. The 'export all' function however gave: "503 Service Temporarily Unavailable [insert page break] nginx", so I attempted your suggestion in comment #2. Properly inserted my client_id created via the user-made Spotify app into the URL (with AND without the brackets during multiple attempts), e.g. To which the aforementioned error: "INVALID_CLIENT: Invalid Client" arises. If all else fails, I'm going to export each of my 84 playlists individually for my sake, but getting the 'export all' function to work would be greatly appreciated. |
I moved to https://github.com/Alex131089/spotify-backup personally (forked from https://github.com/marpala/spotify-backup with more data retreived). |
I'm still getting |
The @Alex131089 fork doesn't appear to work anymore, but https://github.com/jnylen/spotify-backup did work for me and it supports a new |
@Iristyle : any clues how to get this working? I get this error in Terminal, whether i double click it or run from command line. Traceback (most recent call last): |
I have tweaked exportify code to allow exporting in batches. I added two input boxes near the 'export all' button. Input the min and max playlist numbers to export, and when you hit 'export all', this range is ONLY what will get exported. A range of about 100 works for me most of the time, you can experiment with higher and lower ranges as you desire. It's a fairly simple tweak in two places in the exportify.js file. To add the min/max boxes, find this code:
And replace with:
Then for the range checks, look for this code:
And replace with:
That's it! I was able to get my 272 playlists backed up in just 3 batch exports. Hope it works as well for others. |
@cpinheir1103 PR? :) |
I've made a version that uses Promises to delay server queries. My |
@pavelkomarov – Hi, just tried this out and I'm seeing quite a few bugs. In Chrome, the "Get Started" button doesn't respond when clicked. In Firefox, after loading my playlists, the arrows to go to the next page are not responding, and if I click "Export All" on the first page, I get a pop-up window that shows the number "400" w/ nothing else (I have 470 playlists). If I hit OK, it pops up again a couple times, and at the bottom of the page is the usual API Rate Limiting error. |
@cpinheir1103 – Is there a web link for this variation of Exportify? Otherwise, how do you edit the exportify.js file and run the app? |
@shape55 Open some issues https://github.com/pavelkomarov/exportify/issues, and we'll try to get this sorted out. I've tested exclusively in Firefox, so it's not entirely surprising it's not working perfectly in Chrome, but I just downloaded Chrome and tried it and am not having a problem. I have like 12 playlists of my own, so I didn't notice I broke the next/previous page functionality. 400+ is really pushing it, so I'll need to fix issue #1 to help you there. |
@pavelkomarov – Ok, gotcha – I just opened 3 new issues there. Thanks |
@Alex131089's approach is the right one. What causes the rate limit error is huge short bursts of traffic, not several bursts over minutes. It's unlikely using your own clientid would really help, because it's unlikely someone else is using exportify at exactly the same time as you are. I've implemented waiting in my Export All functionality, so now each export is rate-limited, and multiple exports are accomplished in series. I've also fixed the paginator. |
Thanks so much everyone for the continued feedback and apologies for my lack of reactivity. Let's use this issue for advancing on rate liming. |
Trying to export all my 315 playlists I quickly run into the message:
Reading up on the limits I see:
https://developer.spotify.com/web-api/user-guide/#rate-limiting
So I guess one easy way of overcoming the limit would be to fork (and host it at some other address I guess) and register it as my own application with spotify.
Do you think that is all there is to it? Looking at the code I see that exportify is doing it in batches of 20 lists at a time (I think). Would some waiting between each request help?
Another thing would probably be to implement some "wait and retry"-scheme for when these responses are recieved.
This is just a few loose ideas. I am adding the issue here to start the discussion since I saw some other user having the same problem somewhere.
Exportify seems really great otherwise! Nice that you have taken the time to code this up.
The text was updated successfully, but these errors were encountered: