Merge pull request #497 from TiA4f8R/fix-player-js-url-redirect

Fix YouTube player JavaScript URL redirection
This commit is contained in:
Tobias Groza 2020-12-27 18:04:40 +01:00 committed by GitHub
commit 3c8c8e7307
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -842,8 +842,8 @@ public class YoutubeStreamExtractor extends StreamExtractor {
if (playerJsUrl.startsWith("//")) {
playerJsUrl = HTTPS + playerJsUrl;
} else if (playerJsUrl.startsWith("/")) {
// sometimes https://youtube.com part has to be added manually
playerJsUrl = HTTPS + "//youtube.com" + playerJsUrl;
// sometimes https://www.youtube.com part has to be added manually
playerJsUrl = HTTPS + "//www.youtube.com" + playerJsUrl;
}
cachedDeobfuscationCode = loadDeobfuscationCode(playerJsUrl);