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
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)."