Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot retrieve HLS manifest for live streams #566

Closed
Tyrrrz opened this issue Jun 21, 2021 · 5 comments
Closed

Cannot retrieve HLS manifest for live streams #566

Tyrrrz opened this issue Jun 21, 2021 · 5 comments

Comments

@Tyrrrz
Copy link
Owner

Tyrrrz commented Jun 21, 2021

Version

6.0.2, 6.0.3

Details

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:52.11]     User can get HTTP live stream URL from a video [FAIL]
Error: User can get HTTP live stream URL from a video: YoutubeExplode.Exceptions.YoutubeExplodeException : Could not extract HTTP Live Stream manifest URL. Video '5qap5aO4i9A' is likely not a live stream.
  Failed User can get HTTP live stream URL from a video [388 ms]
  Error Message:
   YoutubeExplode.Exceptions.YoutubeExplodeException : Could not extract HTTP Live Stream manifest URL. Video '5qap5aO4i9A' is likely not a live stream.
  Stack Trace:
     at YoutubeExplode.Videos.Streams.StreamClient.GetHttpLiveStreamUrlAsync(VideoId videoId, CancellationToken cancellationToken) in D:\a\YoutubeExplode\YoutubeExplode\YoutubeExplode\Videos\Streams\StreamClient.cs:line 344
   at YoutubeExplode.Tests.StreamsSpecs.User_can_get_HTTP_live_stream_URL_from_a_video() in D:\a\YoutubeExplode\YoutubeExplode\YoutubeExplode.Tests\StreamsSpecs.cs:line 231
--- End of stack trace from previous location ---

Steps to reproduce

Run test: User can get HTTP live stream URL from a video

@TaoziDB
Copy link

TaoziDB commented Jun 25, 2021

for live streams, such as https://www.youtube.com/watch?v={videoId}
in html data using newest browser user-agent:
between "var ytInitialPlayerResponse = " and ";var meta =",
you can get json string of player response,
and "hlsManifestUrl" is the master m3u8 url of all resolutions

@vikashhd
Copy link

GetHttpLiveStreamUrlAsync returning error 404

@Hexer10
Copy link

Hexer10 commented Jul 2, 2021

Seems like the hls manifest url is present in the WatchPage's player response. In my dart port I managed to make this working by using the watchpage and its player response.

@Tyrrrz Tyrrrz closed this as completed in 8fac57d Jul 2, 2021
@Tyrrrz
Copy link
Owner Author

Tyrrrz commented Jul 2, 2021

Seems like the hls manifest url is present in the WatchPage's player response. In my dart port I managed to make this working by using the watchpage and its player response.

Thanks!

@Joseph-Nathan
Copy link

any exp code please ,
i do not found player response in scraping .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants