[PR #309] [MERGED] Remove quotes from cookies #597

Closed
opened 2026-02-27 23:01:38 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sigma67/ytmusicapi/pull/309
Author: @JohnHKoh
Created: 10/13/2022
Status: Merged
Merged: 11/3/2022
Merged by: @sigma67

Base: masterHead: remove-cookie-quotes


📝 Commits (1)

  • b3547a9 Remove quotes from cookies

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 ytmusicapi/helpers.py (+1 -1)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/sigma67/ytmusicapi/pull/309 **Author:** [@JohnHKoh](https://github.com/JohnHKoh) **Created:** 10/13/2022 **Status:** ✅ Merged **Merged:** 11/3/2022 **Merged by:** [@sigma67](https://github.com/sigma67) **Base:** `master` ← **Head:** `remove-cookie-quotes` --- ### 📝 Commits (1) - [`b3547a9`](https://github.com/sigma67/ytmusicapi/commit/b3547a96fea1f74ea1c2dcdc94df8cf7067ee206) Remove quotes from cookies ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `ytmusicapi/helpers.py` (+1 -1) </details> ### 📄 Description Due to the SimpleCookie issue described [here](https://github.com/sigma67/ytmusicapi/issues/294), 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](https://github.com/django/django/commit/93a135d111c2569d88d65a3f4ad9e6d9ad291452) 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 23:01:38 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#597
No description provided.