[PR #108] [CLOSED] Retreive streaming data for 256 kbps AAC #561

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

📋 Pull Request Information

Original PR: https://github.com/sigma67/ytmusicapi/pull/108
Author: @corrmaan
Created: 11/24/2020
Status: Closed

Base: masterHead: audio_quality_high


📝 Commits (6)

  • dd19bab Retreive streaming data for 256 kbps AAC
  • f430e0b Split get_streamingData() off of get_song()
  • a59439b Rename get_streamingData() to get_streaming_data()
  • ef4bd11 Documentation and tests update
  • d4e0cfd Adjust variable name for proper naming convention
  • df29c09 Edit to get_streaming_data() test

📊 Changes

3 files changed (+105 additions, -28 deletions)

View changed files

📝 docs/source/reference.rst (+1 -0)
📝 tests/test.py (+5 -1)
📝 ytmusicapi/mixins/browsing.py (+99 -27)

📄 Description

Adding the parameters c=WEB_REMIX and cver=0.1 to the get_video_info request in get_song() returns a streamingData adaptiveFormat of itag 141, audioQuality of AUDIO_QUALITY_HIGH, a 256 kbps AAC m4a for authenticated requests from YouTube Music Premium subscribers.

Unfortunately, these parameters result in player_response['videoDetails']['shortDescription'] not being returned, the information in which contains useful song metadata.

player_response['microformat']['microformatDataRenderer']['description'] is returned, but it seems to be a truncated version of shortDescription, so the metadata parsing in get_song() does not work on that response.

Therefore, a second get_video_info request is made with the updated parameters and the metadata in song_meta is copied in to the new player_response['videoDetails'], which is returned from get_song() instead of song_meta.


🔄 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/108 **Author:** [@corrmaan](https://github.com/corrmaan) **Created:** 11/24/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `audio_quality_high` --- ### 📝 Commits (6) - [`dd19bab`](https://github.com/sigma67/ytmusicapi/commit/dd19bab74760f1a61aca2ae8080c2912cb84812d) Retreive streaming data for 256 kbps AAC - [`f430e0b`](https://github.com/sigma67/ytmusicapi/commit/f430e0be1503f4e0a9e34e3fa4a7f04ac0d3e6f8) Split `get_streamingData()` off of `get_song()` - [`a59439b`](https://github.com/sigma67/ytmusicapi/commit/a59439b0e37811e257976934949377561717031b) Rename `get_streamingData()` to `get_streaming_data()` - [`ef4bd11`](https://github.com/sigma67/ytmusicapi/commit/ef4bd115415fbbe43a1f0c27034fb4dc9e2a85a3) Documentation and tests update - [`d4e0cfd`](https://github.com/sigma67/ytmusicapi/commit/d4e0cfd70fa44f0c34d6116946342ff8ee080fcd) Adjust variable name for proper naming convention - [`df29c09`](https://github.com/sigma67/ytmusicapi/commit/df29c09ac61a0e4ff370b653e1592b36f79e6a58) Edit to `get_streaming_data()` test ### 📊 Changes **3 files changed** (+105 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `docs/source/reference.rst` (+1 -0) 📝 `tests/test.py` (+5 -1) 📝 `ytmusicapi/mixins/browsing.py` (+99 -27) </details> ### 📄 Description Adding the parameters `c=WEB_REMIX` and `cver=0.1` to the `get_video_info` request in `get_song()` returns a `streamingData` `adaptiveFormat` of `itag` `141`, `audioQuality` of `AUDIO_QUALITY_HIGH`, a 256 kbps AAC m4a for authenticated requests from YouTube Music Premium subscribers. Unfortunately, these parameters result in `player_response['videoDetails']['shortDescription']` not being returned, the information in which contains useful song metadata. `player_response['microformat']['microformatDataRenderer']['description']` is returned, but it seems to be a truncated version of `shortDescription`, so the metadata parsing in `get_song()` does not work on that response. Therefore, a second `get_video_info` request is made with the updated parameters and the metadata in `song_meta` is copied in to the new `player_response['videoDetails']`, which is returned from `get_song()` instead of `song_meta`. --- <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:29 +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#561
No description provided.