Youtubeexplode: HttpRequestException: 'Response status code does not indicate success: 403 (Forbidden).'

Created on 10 Mar 2020  路  6Comments  路  Source: Tyrrrz/YoutubeExplode

Getting a 403 error on many videos when attempting to download any of the media streams. For example: https://www.youtube.com/watch?v=QkF3oxziUI4

System.Net.Http.HttpRequestException HResult=0x80131500 Message=Response status code does not indicate success: 403 (Forbidden). Source=System.Net.Http StackTrace: at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at YoutubeExplode.Internal.HttpClientEx.<GetStreamAsync>d__4.MoveNext() in \repos\YoutubeExplode-master\YoutubeExplode\Internal\HttpClientEx.cs:line 60 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at YoutubeExplode.Internal.SegmentedHttpStream.<ReadAsync>d__19.MoveNext() in \repos\YoutubeExplode-master\YoutubeExplode\Internal\SegmentedHttpStream.cs:line 65 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at YoutubeExplode.Internal.Extensions.<CopyToAsync>d__18.MoveNext() in \repos\YoutubeExplode-master\YoutubeExplode\Internal\Extensions.cs:line 155 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at YoutubeExplode.YoutubeClient.<DownloadMediaStreamAsync>d__14.MoveNext() in \repos\YoutubeExplode-master\YoutubeExplode\YoutubeClient.MediaStream.cs:line 36 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at YoutubeExplode.YoutubeClient.<DownloadMediaStreamAsync>d__15.MoveNext() in \repos\YoutubeExplode-master\YoutubeExplode\YoutubeClient.MediaStream.cs:line 46 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at YoutubeExplode.DemoWpf.ViewModels.MainViewModel.<DownloadMediaStream>d__49.MoveNext() in \repos\YoutubeExplode-master\YoutubeExplode.DemoWpf\ViewModels\MainViewModel.cs:line 196

bug caused by youtube help wanted

All 6 comments

Also getting the same behavior. Same 403 error happens on every video I've tried today. It was working fine yesterday running on the same code.

I hope it 鈥檚 not Google 鈥檚 new policy

Looks like a breaking change on YouTube's side. Will take a look when I have time.

Pushed a new version

Tyrrrz,thanks

Still getting this error when attempting to download any of the media streams:

System.Net.Http.HttpRequestException: "Response status code does not indicate success: 403 (Forbidden)."

https://youtu.be/XqpNt2wiLEU

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tyrrrz picture Tyrrrz  路  3Comments

severino65 picture severino65  路  3Comments

jungjanos picture jungjanos  路  6Comments

KrSiddharth picture KrSiddharth  路  5Comments

Luke1998x picture Luke1998x  路  5Comments