[PR #865] fix browser setup for Chrome (#857) #776

Open
opened 2026-02-27 23:02:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sigma67/ytmusicapi/pull/865
Author: @apastel
Created: 1/31/2026
Status: 🔄 Open

Base: mainHead: fix-chrome-auth-857


📝 Commits (3)

  • 149b4dd fix browser setup for Chrome (#857)
  • 19b821c Merge branch 'sigma67:main' into fix-chrome-auth-857
  • 515f114 add automated test using chrome/firefox headers from test data

📊 Changes

4 files changed (+157 additions, -0 deletions)

View changed files

📝 tests/auth/test_browser.py (+36 -0)
tests/data/raw_chrome_headers.txt (+87 -0)
tests/data/raw_firefox_headers.txt (+25 -0)
📝 ytmusicapi/auth/browser.py (+9 -0)

📄 Description

Fixes #857

Supports all three of the following formats for pasting headers:

  1. Firefox
  2. Chrome (new format without colons)
  3. Chrome (old format with colons on header keys)

Had to add a corner case to handled the odd Decoded: header in Chrome, which looks like the following:

Decoded:
message ClientVariations {
  // Active Google-visible variation IDs on this client. These are reported for analysis, but do not directly affect any server-side behavior.
  repeated int32 variation_id = [3300102, 3300132, 3313321, 3323055, 3330197, 3362821, 3393046, 3393674, 3395745, 3396053, 3396249, 3396352, 3396365, 3396446, 3396569, 3396819, 3396954, 3397042, 3397046];
  // Active Google-visible variation IDs on this client that trigger server-side behavior. These are reported for analysis *and* directly affect server-side behavior.
  repeated int32 trigger_variation_id = [3392236, 3396349];
}

It's the only one that still has a colon on the header key so it had to be handled differently. The end result in the parsed user_headers is the same as it was before, where the property ends up being Decoded: "}"


🔄 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/865 **Author:** [@apastel](https://github.com/apastel) **Created:** 1/31/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-chrome-auth-857` --- ### 📝 Commits (3) - [`149b4dd`](https://github.com/sigma67/ytmusicapi/commit/149b4dd95fa19085c4199ca048f0bffa922fb1e6) fix browser setup for Chrome (#857) - [`19b821c`](https://github.com/sigma67/ytmusicapi/commit/19b821cad1a90412da86423a23717141839f0a8c) Merge branch 'sigma67:main' into fix-chrome-auth-857 - [`515f114`](https://github.com/sigma67/ytmusicapi/commit/515f114b35536aac160e4b63563db6512e515d26) add automated test using chrome/firefox headers from test data ### 📊 Changes **4 files changed** (+157 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/auth/test_browser.py` (+36 -0) ➕ `tests/data/raw_chrome_headers.txt` (+87 -0) ➕ `tests/data/raw_firefox_headers.txt` (+25 -0) 📝 `ytmusicapi/auth/browser.py` (+9 -0) </details> ### 📄 Description Fixes #857 Supports all three of the following formats for pasting headers: 1. Firefox 2. Chrome (new format without colons) 3. Chrome (old format with colons on header keys) Had to add a corner case to handled the odd `Decoded:` header in Chrome, which looks like the following: ``` Decoded: message ClientVariations { // Active Google-visible variation IDs on this client. These are reported for analysis, but do not directly affect any server-side behavior. repeated int32 variation_id = [3300102, 3300132, 3313321, 3323055, 3330197, 3362821, 3393046, 3393674, 3395745, 3396053, 3396249, 3396352, 3396365, 3396446, 3396569, 3396819, 3396954, 3397042, 3397046]; // Active Google-visible variation IDs on this client that trigger server-side behavior. These are reported for analysis *and* directly affect server-side behavior. repeated int32 trigger_variation_id = [3392236, 3396349]; } ``` It's the only one that still has a colon on the header key so it had to be handled differently. The end result in the parsed `user_headers` is the same as it was before, where the property ends up being `Decoded: "}"` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#776
No description provided.