Spotify Playlist

Terry Reedy tjreedy at udel.edu
Sun May 31 23:11:29 EDT 2020


On 5/31/2020 7:10 PM, Chris Angelico wrote:
> On Mon, Jun 1, 2020 at 8:34 AM <giovanni.braschi2 at gmail.com> wrote:
>> This means that a fraudulent user can report your playlist 10000000 times a day, and there is nothing you can do against it, because if Spotify bans his fake "mail" he will fill the form with another fake email. This also means that if the reporter flag my playlist 10.000 times, I have to rewrite title, caption and upload user 10.000 times, and it is absolutely absurd. I sent hundreds of mail to the spotify team, they told me they are working to fix it, but currently there is no way to stop this (THIS IS CRAZY!)
>>
> 
> Yes. That is crazy. Spotify needs to fix that. However, in the meantime...
> 
>> So my question is: is there a way to create a code with Python, that auto rewrite the title of a playlist each time Python sees the title has disappeared?
>>
>> For example:
>> The reporter reports my playlist --> Title, Description and Image are gone (until I don't rewrite them again)
>>
>> Python notices that the title is gone and automatically rewrite the title and caption
>>
>> Do you think this is possible?

Python has tools to both make html requests and extract and decode json 
responses.  (And to parse standard timestamps.)

> Hmm. Leaving aside the automation part, I think it's going to be
> possible. You'd need to have a file somewhere with a list of your
> playlists and their Spotify IDs, and the desired titles and captions,
> and then a program that uses the Spotify API to reapply those details:
> https://developer.spotify.com/documentation/web-api/reference/playlists/change-playlist-details/
> 
> And for the cover image:
> https://developer.spotify.com/documentation/web-api/reference/playlists/upload-custom-playlist-cover/
> 
> Automation would be a bit harder, as you'd have to periodically query
> the API for each playlist's description, and then update them.
> https://developer.spotify.com/documentation/web-api/reference/playlists/get-playlist/
> 
> The reason this would be harder is that you'd risk running up against
> the rate limits:
> https://developer.spotify.com/documentation/web-api/#rate-limiting

Their recommendation is to query infomation about multiple items at 
once, as their API allows.  I suspect that one can also add or update 
multiple items at once.

There is also a mechanism to ask whether locally cached information has 
changed by sending a cache tag, but I could not tell if that would apply 
to your situation.

> But that's a matter of striking a balance between how much you use the
> API and how quickly you notice a problem. Initially, just having
> something that you manually run would be fairly straight-forward, and
> should still be of value.
> 
>> I am willing to pay for someone making this code for me, because these fake reports are becoming more and more frequent, and as a music blogger, Spotify Playlists are a part of my income. I can't stay 24/7 at home rewriting the titles of my falsely reported playlist (with no reason)
>>
> 
> Can't blame you!
> 
> I won't take on the job myself, but I fully support the notion :) To
> whoever ends up picking this up, it'll be a pretty straight-forward
> job of calling on an HTTP API.

Let us hope that you can find a Python Web (REST) programmer who uses 
Spotify, and perhaps angered by the current abuse.

-- 
Terry Jan Reedy



More information about the Python-list mailing list