Video: try using the TvHtml5ScreenEmbed client type to get videos.

This commit is contained in:
Ashley :3 2024-06-07 16:53:54 +03:00 committed by GitHub
parent 1ae14cc224
commit 509ca19ca5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,16 +103,8 @@ def extract_video_info(video_id : String)
new_player_response = nil
if reason.nil?
# Fetch the video streams using an Android client in order to get the
# decrypted URLs and maybe fix throttling issues (#2194). See the
# following issue for an explanation about decrypted URLs:
# https://github.com/TeamNewPipe/NewPipeExtractor/issues/562
client_config.client_type = YoutubeAPI::ClientType::AndroidTestSuite
new_player_response = try_fetch_streaming_data(video_id, client_config)
end
# Last hope
if new_player_response.nil?
# Fetch the video streams using an TV client in order to get the
# decrypted URLs and try fixing 4734.
client_config.client_type = YoutubeAPI::ClientType::TvHtml5ScreenEmbed
new_player_response = try_fetch_streaming_data(video_id, client_config)
end