Skip to content

Commit

Permalink
Extract HLS manifest from watch page instead of video info
Browse files Browse the repository at this point in the history
Fixes #566
  • Loading branch information
Tyrrrz authored Jul 2, 2021
1 parent a006888 commit 8fac57d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions YoutubeExplode/Videos/Streams/StreamClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,10 @@ public async ValueTask<string> GetHttpLiveStreamUrlAsync(
VideoId videoId,
CancellationToken cancellationToken = default)
{
var videoInfo = await _controller.GetVideoInfoAsync(videoId, cancellationToken);

var watchPage = await _controller.GetVideoWatchPageAsync(videoId, cancellationToken);
var playerResponse =
videoInfo.TryGetPlayerResponse() ??
watchPage.TryGetPlayerResponse() ??
throw new YoutubeExplodeException("Could not extract player response.");

if (!playerResponse.IsVideoPlayable())
Expand Down

0 comments on commit 8fac57d

Please sign in to comment.