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

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