mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #375] inconsistent return 'sp.category_playlists' object #220
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#220
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 @camantis on GitHub (May 13, 2019).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/375
Hello,
I'm fairly new to python and the Spotify api, however my efforts to understand (and search for) my current issue have not been successful.
I am trying to retrieve all of the playlists from a given category and so I run the following
However, when I run this line, only a fraction of the playlists are return (e.g., for 'hiphop', 7 out of 47 although I'm experiencing this for every category with > 20 playlists).
playlists{ 'items': [list of playlists]
'limit': 50,
'next': None,
'offset': 0,
'previous': None,
'total': 7}}
I understand that the spotify api uses pagination, but I don't understand why 'next' has a value of None? I included the
offsetargument and assigned it to 0. What's returned are the 47 playlists (as expected?).sp.category_playlists('category_id', limit = 50, offset = 0)So it seems to work. However when I re-run the code without any changes, it leads to outputs that alternate between the limited result (7) and the full result (47) with seemingly no pattern. I'm not assigning any variable and I'm getting the same first seven playlists. I have tried modifying the solution for getting tracks shown here but to no luck. Can anyone offer any advice or point me in the right direction?
Thank you
@Garana400 commented on GitHub (Jun 5, 2019):
That's weird, the
offsetvariable is set by default to 0, so it shouldn't make a difference 🤷♂️.@stephanebruckert commented on GitHub (Feb 22, 2020):
Seems to work, maybe that was a temporary issue on the web-api side.
If this happens again, see if you can reproduce it on https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-a-categories-playlists and if that's the case report it here https://github.com/spotify/web-api/