Skip to content

Commit

Permalink
Get correct url for decryption js when it doesn't include https://you…
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Bellew committed Jan 31, 2017
1 parent 798ab40 commit f60f2c5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ public String init(String videoId) throws Exception {
JSONObject ytAssets = jsonObj.getJSONObject("assets");
String playerUrl = ytAssets.getString("js");


if(!playerUrl.contains("youtube.com")) {
playerUrl = "https://youtube.com" + playerUrl;
}
if (playerUrl.startsWith("//")) {
playerUrl = "https:" + playerUrl;
}
Expand Down

0 comments on commit f60f2c5

Please sign in to comment.