Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove quotes from cookies #309

Merged
merged 1 commit into from
Nov 3, 2022
Merged

Conversation

JohnHKoh
Copy link
Contributor

Due to the SimpleCookie issue described here, cookies are not properly parse when they include quotes. As the "YT_CL" cookie includes quotes, this breaks the cookie parser and throws the following exception:

Exception: Your cookie is missing the required value __Secure-3PAPISID

While one solution is to completely re-write the cookie parser to fix this issue, a much simpler one may be to just remove quotes from cookies altogether. Authentication succeeds after removing the quotes from the cookies.

@sigma67
Copy link
Owner

sigma67 commented Nov 1, 2022

Thanks for picking this up and finding the root cause. Seems to be an issue with the Python standard library: python/cpython#92936

Seems sensible to simply strip the quotes here, as we don't need that value for the sapisid.

@sigma67 sigma67 merged commit a406dbc into sigma67:master Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants