old playlist imports

This commit is contained in:
2024-07-23 00:59:06 +02:00
parent ea3ad0e0c4
commit 1bacafd8b2
7 changed files with 107 additions and 36 deletions
+11
View File
@@ -91,4 +91,15 @@ class Spotify():
r.raise_for_status()
return r.json()
def get_playlist_info(self, playlist_id):
token = self.get_system_token()
url = 'https://api.spotify.com/v1/playlists/' + playlist_id
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + token
}
r = requests.get(url, headers=headers)
r.raise_for_status()
return r.json()
spt = Spotify()