Spotipy: Show tracks from playlists returned by search()?

Created on 14 Apr 2016  Â·  6Comments  Â·  Source: plamere/spotipy

Can't figure out how to show the tracks from playlists returned by the search function.

question

All 6 comments

Do you have any code snippets you could show? Can you be more specific wrt what the issue is exactly?

I was able to figure it out. Thanks though for the response!

Jake

On Apr 29, 2016, at 03:52, David Bouchare [email protected] wrote:

Do you have any code snippets you could show? Can you be more specific wrt what the issue is exactly?

—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

please post your solution! I am having the same problem.

Hi there,

I'm not entirely sure I remember correctly, but I believe the issue was
rooted in the fact that I had incorrectly intialized my spotipy object.
Make sure your sequence looks something along the lines of:

sp = spotipy.Spotify(auth=token)
results = sp.search(q=query, limit=limit, type='playlist')

for playlist in results['playlists']['items']:
results = sp.user_playlist(playlist['owner']['id'], playlist['id'], fields="
tracks,next")
tracks = results['tracks']

Hope this helps!

On Wed, Nov 23, 2016 at 4:28 PM, nyboer notifications@github.com wrote:

please post your solution! I am having the same problem.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/plamere/spotipy/issues/89#issuecomment-262645569, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ARIl05Xplrh3p5HXC7HR0plxhquw4WF-ks5rBL4igaJpZM4IG6af
.

yes, thanks. I figured out what I was doing wrong, too - I was calling user_playlist with a variable that stored the logged-in name. once I replaced that with the playlist.owner.id , it worked.

Glad to hear. Best of luck!

On Nov 23, 2016, at 18:41, nyboer notifications@github.com wrote:

yes, thanks. I figured out what I was doing wrong, too - I was calling user_playlist with a variable that stored the logged-in name. once I replaced that with the playlist.owner.id , it worked.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gauthamanms picture gauthamanms  Â·  3Comments

Inspectiver picture Inspectiver  Â·  4Comments

Kurchunk picture Kurchunk  Â·  3Comments

gawaineo picture gawaineo  Â·  3Comments

filipfigzalski picture filipfigzalski  Â·  4Comments