[GH-ISSUE #458] how to get a list of of track ID's from the object returned by current_user_top_tracks? #270

Closed
opened 2026-02-27 23:21:43 +03:00 by kerem · 2 comments
Owner

Originally created by @abby-ebrown on GitHub (Mar 26, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/458

So that's basically my question. I'm trying to get a list of just the track ID's from the blob that's returned by the current_user_top_tracks method.

Originally created by @abby-ebrown on GitHub (Mar 26, 2020). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/458 So that's basically my question. I'm trying to get a list of just the track ID's from the blob that's returned by the current_user_top_tracks method.
kerem 2026-02-27 23:21:43 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@ritiek commented on GitHub (Mar 27, 2020):

You mean something like this?

tracks = sp.current_user_top_tracks()
for item in tracks["items"]:
    print(item["id"])
<!-- gh-comment-id:604921313 --> @ritiek commented on GitHub (Mar 27, 2020): You mean something like this? ```python tracks = sp.current_user_top_tracks() for item in tracks["items"]: print(item["id"]) ```
Author
Owner

@abby-ebrown commented on GitHub (Mar 27, 2020):

holy shite thank you so much!

<!-- gh-comment-id:605094971 --> @abby-ebrown commented on GitHub (Mar 27, 2020): holy shite thank you so much!
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#270
No description provided.