YoutubeExplode: HTTP 404 error when getting video using GetVideoAsync()
Enter Youtube video ID or URL: https://www.youtube.com/watch?v=cGbP2y7Obas Loading…
Unhandled Exception: System.Net.Http.HttpRequestException: Answer status codes do not indicate that the request was successful: 404 (Not Found). by System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode () by YoutubeExplode.Services.Extensions.d__0.MoveNext () --- End of track tracking from previous location where exception was taken --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () by System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Task task) by System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult () at YoutubeExplode.YoutubeClient.d__34.MoveNext () --- End of track tracking from previous location where exception was taken --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () by System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Task task) by System.Runtime.CompilerServices.TaskAwaiter1.GetResult () by DemoConsole.Program.d__2.MoveNext () --- End of track tracking from previous location where exception was taken --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () by System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Task task) by System.Runtime.CompilerServices.TaskAwaiter.GetResult () by DemoConsole.Program.Main (String [] args)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 4
- Comments: 56 (29 by maintainers)
Here’s a package version that doesn’t query
get_video_metadata
for those that need a solution ASAP. Properly fixing this may take some time.https://www.nuget.org/packages/YoutubeExplode/3.4.0-workaround404
Good luck with the fix, Tyrrrz. I’ll see if I can look into some solutions as well. Using the workaround for now.
It looks like most of the missing metadata can be extracted from JSON on the embed page, except for video likes/dislikes and description. The only place I found it so far is on the watch page, which is not accessible for some videos.
v4.0.0 released!
I just pushed a new pre-release package with the fix – https://www.nuget.org/packages/YoutubeExplode/4.0.0-alpha. Please test it if you can, if everything goes well I’ll merge it into master on 15th of December.
As far as I can tell, the workaround will still list all the possible streams. It’s just metadata that may be missing.
@Kriste00 can’t find it anywhere except for the watch page. Maybe someone else can help? Views are fine tho. @ndt0126 ok, I will do that then. I imagine you’re not the only one.