Merge pull request #497 from TiA4f8R/fix-player-js-url-redirect
Fix YouTube player JavaScript URL redirection
This commit is contained in:
commit
3c8c8e7307
|
@ -842,8 +842,8 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
||||||
if (playerJsUrl.startsWith("//")) {
|
if (playerJsUrl.startsWith("//")) {
|
||||||
playerJsUrl = HTTPS + playerJsUrl;
|
playerJsUrl = HTTPS + playerJsUrl;
|
||||||
} else if (playerJsUrl.startsWith("/")) {
|
} else if (playerJsUrl.startsWith("/")) {
|
||||||
// sometimes https://youtube.com part has to be added manually
|
// sometimes https://www.youtube.com part has to be added manually
|
||||||
playerJsUrl = HTTPS + "//youtube.com" + playerJsUrl;
|
playerJsUrl = HTTPS + "//www.youtube.com" + playerJsUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
cachedDeobfuscationCode = loadDeobfuscationCode(playerJsUrl);
|
cachedDeobfuscationCode = loadDeobfuscationCode(playerJsUrl);
|
||||||
|
|
Loading…
Reference in New Issue