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

Playlist response is broken after YouTube API update #1

Closed
03stevensmi opened this issue Apr 8, 2021 · 5 comments
Closed

Playlist response is broken after YouTube API update #1

03stevensmi opened this issue Apr 8, 2021 · 5 comments

Comments

@03stevensmi
Copy link

It was working last time I used this. I Installed everything (net core 3.1.11 & 3.1.13 desktop, runtime & server.
Now I get this error:

SubTubular search-channel https://www.youtube.com/channel/UC0rZoXAD5lxgBHMsjrGwWWQ --for "free speech,censorship,cancel culture,cancelculture,freespeech" --latest 500
Press any key to cancel

Unhandled exception. YoutubeExplode.Exceptions.TransientFailureException: Playlist response is broken.
In most cases, this error indicates that the problem is on YouTube's side and this is not a bug in the library.
To resolve this error, please wait some time and try again.
If this issue persists, please report it on the project's GitHub page.
at YoutubeExplode.ReverseEngineering.Responses.PlaylistResponse.Parse(String raw)
at YoutubeExplode.ReverseEngineering.Responses.PlaylistResponse.<>c__DisplayClass11_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at YoutubeExplode.Internal.Retry.WrapAsync[T](Func1 executeAsync) at YoutubeExplode.Internal.Retry.WrapAsync[T](Func1 executeAsync)
at YoutubeExplode.ReverseEngineering.Responses.PlaylistResponse.GetAsync(YoutubeHttpClient httpClient, String id, Int32 index)
at YoutubeExplode.Playlists.PlaylistClient.GetVideosAsync(PlaylistId id)+MoveNext()
at YoutubeExplode.Playlists.PlaylistClient.GetVideosAsync(PlaylistId id)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
at YoutubeExplode.Internal.Extensions.AsyncEnumerableExtensions.ToListAsync[T](IAsyncEnumerable1 asyncEnumerable) at YoutubeExplode.Internal.Extensions.AsyncEnumerableExtensions.ToListAsync[T](IAsyncEnumerable1 asyncEnumerable)
at YoutubeExplode.AccessibilityExtensions.BufferAsync(IAsyncEnumerable1 asyncVideoEnumerable) at SubTubular.Youtube.SearchPlaylistAsync(SearchPlaylistCommand command, CancellationToken cancellation)+MoveNext() in D:\projects\SubTubular\Youtube.cs:line 40 at SubTubular.Youtube.SearchPlaylistAsync(SearchPlaylistCommand command, CancellationToken cancellation)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult() at SubTubular.Program.Search[T](SearchCommand command, Func2 getResultsAsync, Action1 displayResult) in D:\projects\SubTubular\Program.cs:line 96 at SubTubular.Program.Search[T](SearchCommand command, Func2 getResultsAsync, Action1 displayResult) in D:\projects\SubTubular\Program.cs:line 96 at SubTubular.Program.<>c.<<Main>b__1_2>d.MoveNext() in D:\projects\SubTubular\Program.cs:line 35 --- End of stack trace from previous location where exception was thrown --- at CommandLine.ParserResultExtensions.WithParsedAsync[T](ParserResult1 result, Func`2 action)
at SubTubular.Program.Main(String[] args) in D:\projects\SubTubular\Program.cs:line 39
at SubTubular.Program.

(String[] args)

Will you be able to fix it?

@h0lg h0lg added wontfix This will not be worked on and removed wontfix This will not be worked on labels May 12, 2021
@h0lg
Copy link
Owner

h0lg commented May 12, 2021

This seems to be working all right on my end - I can't reproduce the error. This part of the error message you posted suggests to me that this error may have been temporary:

TransientFailureException: Playlist response is broken.
In most cases, this error indicates that the problem is on YouTube's side and this is not a bug in the library.
To resolve this error, please wait some time and try again.

@03stevensmi Does this error persist on your end with a verified working internet connection? If not, please close this issue. Thanks!

@03stevensmi
Copy link
Author

03stevensmi commented May 16, 2021

Yes the error persist on a verified working internet connection.

Funny enough it was working a few month ago before I uninstalled net core 3.1.
But now, no matter what version on net core 3.1 I run, I get that error every time.

Can you tell me the exact net-core 3.1 installation exe you are using?.
I've tried uninstalling net core 3.1.13 & installing 3.1.0 to see if that works.
But it doesn't.

Same error on version 3.1.10 as well.
Tried on another pc as well and same issue. :(

SubTubular search-videos egeCYaIe21Y gDrFdxWNk8c -f physician,physicist
Press any key to cancel

Unhandled exception. YoutubeExplode.Exceptions.TransientFailureException: Video watch page is broken.
In most cases, this error indicates that the problem is on YouTube's side and this is not a bug in the library.
To resolve this error, please wait some time and try again.
If this issue persists, please report it on the project's GitHub page.
at YoutubeExplode.ReverseEngineering.Responses.WatchPage.<>c__DisplayClass9_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at YoutubeExplode.Internal.Retry.WrapAsync[T](Func1 executeAsync) at YoutubeExplode.Internal.Retry.WrapAsync[T](Func1 executeAsync)
at YoutubeExplode.ReverseEngineering.Responses.WatchPage.GetAsync(YoutubeHttpClient httpClient, String videoId)
at YoutubeExplode.Videos.VideoClient.GetVideoFromWatchPageAsync(VideoId id)
at YoutubeExplode.Videos.VideoClient.GetAsync(VideoId id)
at SubTubular.Youtube.GetVideoAsync(String videoId, Video alreadyLoaded) in D:\projects\SubTubular\Youtube.cs:line 165
at SubTubular.Youtube.SearchVideosAsync(SearchVideos command, CancellationToken cancellation)+MoveNext() in D:\projects\SubTubular\Youtube.cs:line 78
at SubTubular.Youtube.SearchVideosAsync(SearchVideos command, CancellationToken cancellation)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
at SubTubular.Program.Search[T](SearchCommand command, Func2 getResultsAsync, Action1 displayResult) in D:\projects\SubTubular\Program.cs:line 96
at SubTubular.Program.Search[T](SearchCommand command, Func2 getResultsAsync, Action1 displayResult) in D:\projects\SubTubular\Program.cs:line 96
at SubTubular.Program.<>c.<

b__1_4>d.MoveNext() in D:\projects\SubTubular\Program.cs:line 43
--- End of stack trace from previous location where exception was thrown ---
at CommandLine.ParserResultExtensions.WithParsedAsync[T](ParserResult1 result, Func2 action)
at SubTubular.Program.Main(String[] args) in D:\projects\SubTubular\Program.cs:line 47
at SubTubular.Program.(String[] args)

@03stevensmi
Copy link
Author

Now I've got this error. Can you take a look:

SubTubular search-videos egeCYaIe21Y gDrFdxWNk8c -f physician,physicist
Press any key to cancel

Unhandled exception. YoutubeExplode.Exceptions.FatalFailureException: Failed to perform an HTTP request to YouTube due to a fatal failure.
In most cases, this error indicates that YouTube most likely changed something, which broke the library.
If this issue persists, please report it on the project's GitHub page.

Method: GET, RequestUri: 'https://www.youtube.com/get_video_info?video_id=egeCYaIe21Y&el=embedded&eurl=https://youtube.googleapis.com/v/egeCYaIe21Y&hl=en&sts=', Version: 1.1, Content: , Headers:
{
User-Agent: Mozilla/5.0
User-Agent: (Windows NT 10.0; Win64; x64)
User-Agent: AppleWebKit/537.36
User-Agent: (KHTML, like Gecko)
User-Agent: Chrome/80.0.3987.163
User-Agent: Safari/537.36
Accept-Encoding: gzip
Accept-Encoding: deflate
}

StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:
{
X-Frame-Options: SAMEORIGIN
Cache-Control: no-cache
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000
Date: Tue, 18 May 2021 17:02:15 GMT
Server: YouTube
Server: Frontend
Server: Proxy
X-XSS-Protection: 0
Alt-Svc: h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Content-Type: text/html; charset=utf-8
Expires: Tue, 27 Apr 1971 19:44:06 GMT
Content-Length: 0
}
at YoutubeExplode.ReverseEngineering.YoutubeHttpClient.CheckResponse(HttpResponseMessage response)
at YoutubeExplode.ReverseEngineering.YoutubeHttpClient.GetStringAsync(String requestUri, Boolean ensureSuccess)
at YoutubeExplode.ReverseEngineering.Responses.VideoInfoResponse.<>c__DisplayClass10_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at YoutubeExplode.Internal.Retry.WrapAsync[T](Func1 executeAsync) at YoutubeExplode.Internal.Retry.WrapAsync[T](Func1 executeAsync)
at YoutubeExplode.ReverseEngineering.Responses.VideoInfoResponse.GetAsync(YoutubeHttpClient httpClient, String videoId, String sts)
at YoutubeExplode.Videos.VideoClient.GetVideoFromWatchPageAsync(VideoId id)
at YoutubeExplode.Videos.VideoClient.GetAsync(VideoId id)
at SubTubular.Youtube.GetVideoAsync(String videoId, Video alreadyLoaded) in D:\projects\SubTubular\Youtube.cs:line 165
at SubTubular.Youtube.SearchVideosAsync(SearchVideos command, CancellationToken cancellation)+MoveNext() in D:\projects\SubTubular\Youtube.cs:line 78
at SubTubular.Youtube.SearchVideosAsync(SearchVideos command, CancellationToken cancellation)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
at SubTubular.Program.Search[T](SearchCommand command, Func2 getResultsAsync, Action1 displayResult) in D:\projects\SubTubular\Program.cs:line 96
at SubTubular.Program.Search[T](SearchCommand command, Func2 getResultsAsync, Action1 displayResult) in D:\projects\SubTubular\Program.cs:line 96
at SubTubular.Program.<>c.<

b__1_4>d.MoveNext() in D:\projects\SubTubular\Program.cs:line 43
--- End of stack trace from previous location where exception was thrown ---
at CommandLine.ParserResultExtensions.WithParsedAsync[T](ParserResult1 result, Func2 action)
at SubTubular.Program.Main(String[] args) in D:\projects\SubTubular\Program.cs:line 47
at SubTubular.Program.(String[] args)

@03stevensmi
Copy link
Author

03stevensmi commented Jun 22, 2021

Yeah, the issue is happening to my friend as well. Same error message. I got him to try it out.
Is there anything you can do?
Maybe tell me what version of net core you use?
I've tried the oldest, the versions from the uploaded date of this github project, newest and so far... They all
Come with the exact same error. Both on 2 different pc's and on my mates pc who knows a lot more than I do.
Any help? Cheers!

@h0lg
Copy link
Owner

h0lg commented Aug 1, 2021

Thanks for reporting this issue - finally got around to fixing it. The problem was indeed a change in the YouTube API. Please check out version 2.0.0!

@h0lg h0lg closed this as completed Aug 1, 2021
@h0lg h0lg changed the title This app no longer works. Here is the error. Could you please fix? Playlist response is brokenm after Youtube API update Sep 20, 2024
@h0lg h0lg changed the title Playlist response is brokenm after Youtube API update Playlist response is broken after YouTube API update Sep 20, 2024
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

No branches or pull requests

2 participants