Fix download errors by using mostly VISIONOS agent - #965
Open
mysteryx93 wants to merge 2 commits into
Open
Conversation
This was referenced Aug 19, 2026
Author
|
To clarify: the agent fallback works for age-restricted. |
This was referenced Aug 20, 2026
Tyrrrz
requested changes
Aug 22, 2026
Comment on lines
+258
to
+271
| [Fact] | ||
| public async Task I_can_get_the_list_of_available_streams_of_a_video_blocked_by_android_vr() | ||
| { | ||
| // Arrange | ||
| using var youtube = new YoutubeClient(); | ||
|
|
||
| // Act | ||
| var manifest = await youtube.Videos.Streams.GetManifestAsync(VideoIds.AndroidVrBotCheck); | ||
|
|
||
| // Assert | ||
| manifest.Streams.Should().NotBeEmpty(); | ||
| manifest.GetAudioStreams().Should().NotBeEmpty(); | ||
| manifest.GetVideoStreams().Should().NotBeEmpty(); | ||
| } |
| public const string WithMultipleAudioLanguages = "ngqcjXfggHQ"; | ||
| public const string WithUpscaledStreams = "IFACrIx5SZ0"; | ||
| public const string WithUpscaledStreams = "0N1_0SUGlDQ"; | ||
| public const string AndroidVrBotCheck = "u9Dg-g7t2l4"; |
| public const string WithUpscaledStreams = "IFACrIx5SZ0"; | ||
| public const string WithUpscaledStreams = "0N1_0SUGlDQ"; | ||
| public const string AndroidVrBotCheck = "u9Dg-g7t2l4"; | ||
| public const string MadeForKids = "nQuzyJ-C1Fc"; |
Owner
There was a problem hiding this comment.
Let's rename this to just ForKids and move it below ContentCheck* videos
|
|
||
| public async ValueTask<PlayerResponse> GetPlayerResponseAsync( | ||
| VideoId videoId, | ||
| private async ValueTask<PlayerResponse> SendPlayerRequestAsync( |
Owner
There was a problem hiding this comment.
IMO, this should be inlined. The indirection causes more cognitive overhead than duplication.
| return PlayerResponse.Parse(await response.Content.ReadAsStringAsync(cancellationToken)); | ||
| } | ||
|
|
||
| public async ValueTask<PlayerResponse> GetPlayerResponseAsync( |
Owner
There was a problem hiding this comment.
This could probably be refactored into GetPlayerResponseForVisionOsAsync and GetPlayerResponseForAndroidAsync. GetPlayerResponseAsync would then just handle retrying.
Author
|
Do you want me to edit the PR or you handle it from here? |
Owner
|
@mysteryx93 yes, please fix as much as you can youself, I'll clean up afterward |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #902 #962 #964
The downloader has been broken for some time, and that's the kind of issues that are extremely time-consuming to diagnose.
I have put Grok Build to the task, so this is AI-generated, and I have manually reviewed every line modified. All tests are now passing. 2 were still failing: Live Stream and Upscaler, because of outdated videos. The code is fine. I updated the video IDs. All tests now pass. So far Grok passed every test I gave it; it just keeps going until the tests pass.
Summary of changes
The failure was not the video. YouTube’s current ANDROID_VR 1.60.19 client (what YoutubeExplode still used) now returns LOGIN_REQUIRED / “Sign in to confirm you’re not a bot” for public videos, including u9Dg-g7t2l4. That makes the main cipher-less path fail, then the #902 cipher fallback also fails because player JS is no longer parseable.
yt-dlp already moved off that client. Its JS-less default is now VISIONOS, which still returns progressive URLs without a PO token.
What changed
Still broken (unchanged YouTube limits)
• Age-restricted videos still need the cipher client. Player JS is still unparseable.