Tyrrrz/YoutubeExplode

"Please sign in" error; unable to get video or audio manifests

DeveloperJake1 opened this issue · 7 comments

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<System.Boolean>.GetResult (System.Int16 token) (at <1b1419bcebe54d08bf93c1b51dda5d95>:0)
YoutubeExplode.Converter.Utils.Extensions.AsyncCollectionExtensions.ToListAsync[T] (System.Collections.Generic.IAsyncEnumerable1[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.IProgress1[T] progress, System.Threading.CancellationToken cancellationToken) (at /
/YoutubeExplode.Converter/ConversionExtensions.cs:166)

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

Checklist

  • I have looked through existing issues to make sure that this bug has not been reported before
  • I have provided a descriptive title for this issue
  • I have made sure that this bug is reproducible on the latest version of the package
  • I have provided all the information needed to reproduce this bug as efficiently as possible
  • I have sponsored this project
  • I have not read any of the above and just checked all the boxes to submit the issue

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

image

im also having the same problem...

image
same problem

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()

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.

Please let us know when can we expect the fix

Looks like a duplicate of #794, there's more information in that thread