YoutubeExplode icon indicating copy to clipboard operation
YoutubeExplode copied to clipboard

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

Open DeveloperJake1 opened this issue 1 year ago • 6 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+<GetOptimalStreamInfosAsync>d__1.MoveNext () (at //YoutubeExplode.Converter/ConversionExtensions.cs:33) YoutubeExplode.Converter.ConversionExtensions+<GetOptimalStreamInfosAsync>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

  • [X] I have looked through existing issues to make sure that this bug has not been reported before
  • [X] I have provided a descriptive title for this issue
  • [X] I have made sure that this bug is reproducible on the latest version of the package
  • [X] 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

DeveloperJake1 avatar Oct 15 '24 20:10 DeveloperJake1

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

dillonkuester avatar Oct 16 '24 02:10 dillonkuester

image

im also having the same problem...

Sultan-papagani avatar Oct 16 '24 18:10 Sultan-papagani

image same problem

maydoc avatar Oct 16 '24 18:10 maydoc

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

noammaoz avatar Oct 18 '24 11:10 noammaoz

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.

DeveloperJake1 avatar Oct 18 '24 18:10 DeveloperJake1

Please let us know when can we expect the fix

ishanbhardwaj099 avatar Oct 21 '24 10:10 ishanbhardwaj099

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

Tyrrrz avatar Oct 26 '24 12:10 Tyrrrz

Resolved found the actual problem unfortunately it appears you can't just get the audio manifest when downloading Audio only by including the video manifest the error is gone see code below

this fixes the error

` if (rbMp3Only.Checked) { DeleteTemMergeFiles(); ProgessLabel.Text = "Getting video manifest"; long fileSize = audioStreamInfo.Size.Bytes + videoStreamInfo.Size.Bytes; long downloadSpeed = 10 * 1024 * 1024 / 8; // Example download speed (10 Mbps) double downloadTimeInSeconds = CalculateDownloadTime(fileSize, downloadSpeed); // Update ProgressBar with estimated download time pBarDownloadProg.Maximum = (int)downloadTimeInSeconds; var audioDownloadTask = DownloadStreamAsync(youtube, audioStreamInfo, audioFilePath);

//To fix the error you must also download the video stream also //or you get the login error var videoDownloadTask = DownloadStreamAsync(youtube, videoStreamInfo, videoFilePath);

outputFilePath = Path.Combine(VideoFolderPath, txtSaveVideoAs.Texts + ".mp3"); ProgessLabel.Text = "Downloading audio file"; }`

DwainSnickles avatar Jan 21 '25 12:01 DwainSnickles