[GH-ISSUE #89] Show tracks from playlists returned by search()? #41

Closed
opened 2026-02-27 23:20:32 +03:00 by kerem · 6 comments
Owner

Originally created by @jkvlevin on GitHub (Apr 13, 2016).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/89

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

Originally created by @jkvlevin on GitHub (Apr 13, 2016). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/89 Can't figure out how to show the tracks from playlists returned by the search function.
kerem 2026-02-27 23:20:32 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@dabcoder commented on GitHub (Apr 29, 2016):

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

<!-- gh-comment-id:215651994 --> @dabcoder commented on GitHub (Apr 29, 2016): Do you have any code snippets you could show? Can you be more specific wrt what the issue is exactly?
Author
Owner

@jkvlevin commented on GitHub (Apr 29, 2016):

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

Jake

On Apr 29, 2016, at 03:52, David Bouchare notifications@github.com 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

<!-- gh-comment-id:215697505 --> @jkvlevin commented on GitHub (Apr 29, 2016): I was able to figure it out. Thanks though for the response! Jake > On Apr 29, 2016, at 03:52, David Bouchare notifications@github.com 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
Author
Owner

@nyboer commented on GitHub (Nov 23, 2016):

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

<!-- gh-comment-id:262645569 --> @nyboer commented on GitHub (Nov 23, 2016): please post your solution! I am having the same problem.
Author
Owner

@jkvlevin commented on GitHub (Nov 23, 2016):

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
.

<!-- gh-comment-id:262652231 --> @jkvlevin commented on GitHub (Nov 23, 2016): 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> > . >
Author
Owner

@nyboer commented on GitHub (Nov 24, 2016):

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.

<!-- gh-comment-id:262663902 --> @nyboer commented on GitHub (Nov 24, 2016): 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.
Author
Owner

@jkvlevin commented on GitHub (Nov 24, 2016):

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.

<!-- gh-comment-id:262679846 --> @jkvlevin commented on GitHub (Nov 24, 2016): 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. >
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#41
No description provided.