mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 15:26:01 +03:00
[GH-ISSUE #294] Breaking value in Chrome cookie for auth #231
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#231
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 @scrimshander on GitHub (Sep 15, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/294
Just had to refresh my auth headers after many many months, and kept getting a missing key bug in the cookie, pasted from Chrome/developer tools.
Turns out this key/value:
YT_CL={\"loctok\":\"APLXd64Le9G-vJVqzKjy-OsOVBh6NfU2xKnD6awbKB9lJUXzvHGMuNBmjOpK5q_K xVqxgIRcjI_FC27tj-wmyhvUgW8g4A\"};Was breaking the cookie parser (perhaps because of the quotes or the embedded dict). Removing it from the headers text fixed the issue.
@sigma67 commented on GitHub (Sep 21, 2022):
This seems strange, your cookie value is not escaped properly. Can you please paste the original
YT_CLheaders from Chrome? Excluding the identifyingCookieentry and any private information in there, it's not relevant here.@JohnHKoh commented on GitHub (Oct 13, 2022):
Same issue here - in the Chrome DevTools, the cookie looks like:
Before, I was receiving the error: "Exception: Your cookie is missing the required value __Secure-3PAPISID". But after removing the "YT_CL" cookie, it started to work again.
It seems to be an issue with the way
SimpleCookieloads raw data. It does not seem to handle quotes properly.See this long-standing open bug report:
https://github.com/python/cpython/issues/71861