mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 23:36:00 +03:00
[GH-ISSUE #420] KeyError exception when searching community_playlists or featured_playlists with scope = library #314
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#314
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 @nick42d on GitHub (Jul 31, 2023).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/420
Originally assigned to: @nick42d on GitHub.
G'day,
Noticed that the function parsers.search._get_param_2 does not handle "community_playlists" or "featured_playlists".
However, parsers.search.get_search_params calls this function with these parameters when scope is set to "library" and therefore we get a KeyError.
Happy to raise a PR if you are able to advise if this should be handled with a documented exception or alternative params sent to innertube.
Cheers Nick
To Reproduce
call YTMusic.search('xxx', 'community_playlists', 'library').
result "KeyError: 'community_playlists'"
@sigma67 commented on GitHub (Aug 1, 2023):
I see that appropriate tests are missing as well. https://github.com/sigma67/ytmusicapi/blob/master/tests/test.py#L129
Feel free to fix and add tests :)
@nick42d commented on GitHub (Aug 4, 2023):
Have added a PR, please let me know if you see any issues!