mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-26 15:56:00 +03:00
[GH-ISSUE #451] KeyError: 'contents' when searching for a song #336
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#336
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 @ranile on GitHub (Oct 6, 2023).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/451
Describe the bug
Searching for a song fails with
KeyError: 'contents'To Reproduce
Stacktrace
@sigma67 commented on GitHub (Oct 7, 2023):
This is library search, can you please post a screenshot of what that search result looks like for you in the Web UI.
And a JSON of the server response, if possible.
@ranile commented on GitHub (Oct 7, 2023):
Can you provide the code to make a fetch request for the endpoint that's being called? I can make the fetch request from the console and give you the response.
If the request is something the UI makes, Firefox lets you copy the request as fetch from the network tab in the dev tools
@sigma67 commented on GitHub (Oct 7, 2023):
You can just replicate the search request on the Web UI and copy the response as you would when copying auth credentials (though response, not request headers in this case).
https://ytmusicapi.readthedocs.io/en/stable/setup/browser.html#copy-authentication-headers
@ranile commented on GitHub (Oct 9, 2023):
It must've been some weird A/B thing google did? I just tried again and now it works. Thanks for the help and making this library
@sigma67 commented on GitHub (Oct 9, 2023):
Google A/B tests, the bane of my existence. Thanks for reporting back!