Tyrrrz / YoutubeExplode

Abstraction layer over YouTube's internal API
MIT License
2.93k stars 491 forks source link

"Please sign in" error - Unable to Get Video or Audio Manifests #830

Open DeveloperJake1 opened 1 week ago

DeveloperJake1 commented 1 week ago

Version

6.4.3

Platform

.NET Standard 2.1

Steps to reproduce

Run the following code:

var youtube = new YoutubeClient();

var videoUrl = '';
await youtube.Videos.DownloadAsync(videoUrl, pwy);

or..

await youtube.Videos.Streams.GetManifestAsync(videoUrl, cancelToken);

var streamInfo = streamManifest
       .GetVideoOnlyStreams()
       .Where(s => s.Container == Container.Mp4)
       .GetWithHighestVideoQuality();

Or simply try to download a video in any way.

Details

When I execute any method which involves getting the Manifest of a video, the system throws the error which is printed below.

This was not recently happening, and is just now occurring potentially due to a patch from youtube side. From other posts, the solution seems to be by using a different repository to create a sign in function; however, this is not optimal for all types of apps/websites which relied on Youtube Explode's non-login based repo.

VideoUnplayableException: Video '' is unplayable. Reason: 'Please sign in'. YoutubeExplode.Videos.Streams.StreamClient.GetStreamInfosAsync (YoutubeExplode.Videos.VideoId videoId, YoutubeExplode.Bridge.PlayerResponse playerResponse, System.Threading.CancellationToken cancellationToken) (at //YoutubeExplode/Videos/Streams/StreamClient.cs:212) YoutubeExplode.Videos.Streams.StreamClient.GetStreamInfosAsync (YoutubeExplode.Videos.VideoId videoId, System.Threading.CancellationToken cancellationToken) (at //YoutubeExplode/Videos/Streams/StreamClient.cs:276) YoutubeExplode.Videos.Streams.StreamClient.GetManifestAsync (YoutubeExplode.Videos.VideoId videoId, System.Threading.CancellationToken cancellationToken) (at /_/YoutubeExplode/Videos/Streams/StreamClient.cs:292) YoutubeExplode.Converter.ConversionExtensions+d_1.MoveNext () (at //YoutubeExplode.Converter/ConversionExtensions.cs:33) YoutubeExplode.Converter.ConversionExtensions+d_1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult (System.Int16 token) (at <1b1419bcebe54d08bf93c1b51dda5d95>:0) YoutubeExplode.Converter.Utils.Extensions.AsyncCollectionExtensions.ToListAsync[T] (System.Collections.Generic.IAsyncEnumerable`1[T] source) (at //YoutubeExplode.Converter/Utils/Extensions/AsyncCollectionExtensions.cs:13) YoutubeExplode.Converter.Utils.Extensions.AsyncCollectionExtensions.ToListAsync[T] (System.Collections.Generic.IAsyncEnumerable1[T] source) (at /_/YoutubeExplode.Converter/Utils/Extensions/AsyncCollectionExtensions.cs:13) YoutubeExplode.Converter.ConversionExtensions.DownloadAsync (YoutubeExplode.Videos.VideoClient videoClient, YoutubeExplode.Videos.VideoId videoId, YoutubeExplode.Converter.ConversionRequest request, System.IProgress1[T] progress, System.Threading.CancellationToken cancellationToken) (at //YoutubeExplode.Converter/ConversionExtensions.cs:117) YoutubeExplode.Converter.ConversionExtensions.DownloadAsync (YoutubeExplode.Videos.VideoClient videoClient, YoutubeExplode.Videos.VideoId videoId, System.String outputFilePath, System.Action1[T] configure, System.IProgress1[T] progress, System.Threading.CancellationToken cancellationToken) (at //YoutubeExplode.Converter/ConversionExtensions.cs:148) YoutubeExplode.Converter.ConversionExtensions.DownloadAsync (YoutubeExplode.Videos.VideoClient videoClient, YoutubeExplode.Videos.VideoId videoId, System.String outputFilePath, System.IProgress`1[T] progress, System.Threading.CancellationToken cancellationToken) (at /_/YoutubeExplode.Converter/ConversionExtensions.cs:166)

At the moment, Yt Explode is unusable on my side.

Checklist

dillonkuester commented 1 week ago

Getting similar error please sign in. Also unable to access folder on Download Async regardless of permissions

Sultan-papagani commented 1 week ago

image

im also having the same problem...

maydoc commented 1 week ago

image same problem

noammaoz commented 5 days ago

I have noticed when a video is blocked in your country, you receive an error. For instance, these 2 videos (TII6YfZ4xqw and 32G2evH77yE) are blocked in my country and I'm encounter this error when attempting to retrieve the video manifest:

Video video = await youtube.Videos.GetAsync(url);
StreamManifest manifest = await youtube.Videos.Streams.GetManifestAsync(video.Id);
Exception has occurred: CLR/YoutubeExplode.Exceptions.VideoUnplayableException
An exception of type 'YoutubeExplode.Exceptions.VideoUnplayableException' occurred in System.Private.CoreLib.dll but was not handled in user code: 'Video '32G2evH77yE' is unplayable. Reason: 'Please sign in'.'
 at YoutubeExplode.Videos.Streams.StreamClient.<GetStreamInfosAsync>d__7.MoveNext() at System.Threading.Tasks.ValueTask`1.get_Result() at YoutubeExplode.Videos.Streams.StreamClient.<GetStreamInfosAsync>d__8.MoveNext() at System.Threading.Tasks.ValueTask`1.get_Result() at YoutubeExplode.Videos.Streams.StreamClient.<GetManifestAsync>d__9.MoveNext() at System.Threading.Tasks.ValueTask`1.get_Result()
DeveloperJake1 commented 5 days ago

I have noticed when a video is blocked in your country, you receive an error. For instance, these 2 videos (TII6YfZ4xqw and 32G2evH77yE) are blocked in my country and I'm encounter this error when attempting to retrieve the video manifest:

Video video = await youtube.Videos.GetAsync(url);
StreamManifest manifest = await youtube.Videos.Streams.GetManifestAsync(video.Id);
Exception has occurred: CLR/YoutubeExplode.Exceptions.VideoUnplayableException
An exception of type 'YoutubeExplode.Exceptions.VideoUnplayableException' occurred in System.Private.CoreLib.dll but was not handled in user code: 'Video '32G2evH77yE' is unplayable. Reason: 'Please sign in'.'
 at YoutubeExplode.Videos.Streams.StreamClient.<GetStreamInfosAsync>d__7.MoveNext() at System.Threading.Tasks.ValueTask`1.get_Result() at YoutubeExplode.Videos.Streams.StreamClient.<GetStreamInfosAsync>d__8.MoveNext() at System.Threading.Tasks.ValueTask`1.get_Result() at YoutubeExplode.Videos.Streams.StreamClient.<GetManifestAsync>d__9.MoveNext() at System.Threading.Tasks.ValueTask`1.get_Result()

The video isn't blocked in my country. It does this with every video, including the sample blender one.

ishanbhardwaj099 commented 2 days ago

Please let us know when can we expect the fix