mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #740] Option to automatically loop through paginated playlists with length more than 100 in spotipy.spotify.playlist() function #448
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#448
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AbhishekJavali on GitHub (Nov 7, 2021).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/740
Is your feature request related to a problem? Please describe.
With the spotipy.spotify.playlist() function the items or tracks returned by default is limited to 100 and the results are paginated. And there is no way to read further details.
Describe the solution you'd like
Provide a parameter which would take care of looping through the paginated results and return the full playlist items.
Describe alternatives you've considered
An alternate solution that I ended up using is to get the total track number and loop over the results using spotipy.spotify,playlist_items with offsets at steps of 50 (max value allowed by spotify) to get the complete playlist items. Please see the code example below
@stephanebruckert commented on GitHub (Dec 11, 2021):
Won't do for the reason given here https://github.com/plamere/spotipy/pull/751#issuecomment-991626458
However thanks both for raising this!