diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e398373..65fc4497 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Removed + +- **Breaking** method `SignatureDecipher::downloadPlayerScript()` was removed, use `SignatureDecipher::downloadRawPlayerScript()` instead +- **Breaking** method `SignatureDecipher::decipherSignature()` was removed, use `SignatureDecipher::decipherSignatureWithRawPlayerScript()` instead + ## [0.3] - 2017-07-28 ### Added diff --git a/src/SignatureDecipher.php b/src/SignatureDecipher.php index 4b881e4e..6160e3d7 100644 --- a/src/SignatureDecipher.php +++ b/src/SignatureDecipher.php @@ -53,31 +53,6 @@ public static function downloadRawPlayerScript($playerURL) ); } - /** - * download the raw player script with cache - * - * @deprecated since version 0.3, to be removed in 0.4. Use SignatureDecipher::downloadRawPlayerScript() instead - * - * @param string $videoID - * @return string returns the playerID - */ - public static function downloadPlayerScript($videoID) - { - @trigger_error(__METHOD__ . ' is deprecated since version 0.3, to be removed in 0.4. Use SignatureDecipher::downloadRawPlayerScript() instead', E_USER_DEPRECATED); - - $player_info = static::getPlayerInfoByVideoId($videoID); - - $playerID = $player_info[0]; - $playerURL = $player_info[1]; - - if(!file_exists('cache/playerscript_' . $playerID)) { - $decipherScript = self::downloadRawPlayerScript($playerURL); - file_put_contents('cache/playerscript_' . $playerID, $decipherScript); - } - - return $playerID; - } - /** * decipher a signature with a raw player script * @@ -159,36 +134,6 @@ public static function decipherSignatureWithRawPlayerScript($decipherScript, $si return $decipheredSignature; } - /** - * decipher a signature - * - * @deprecated since version 0.3, to be removed in 0.4. Use SignatureDecipher::decipherSignatureWithRawPlayerScript() instead - * - * @param string $playerID - * @param string $signature - * @return string returns the decipherd signature - */ - public static function decipherSignature($playerID, $signature) - { - @trigger_error(__METHOD__ . ' is deprecated since version 0.3, to be removed in 0.4. Use SignatureDecipher::decipherSignatureWithRawPlayerScript() instead', E_USER_DEPRECATED); - - if(!$playerID) return; - - if(file_exists("cache/playerscript_$playerID")) - { - $decipherScript = file_get_contents("cache/playerscript_$playerID"); - } - else - { - die("\n==== Player script was not found for id: $playerID ===="); - } - - return static::decipherSignatureWithRawPlayerScript( - $decipherScript, - $signature - ); - } - private static function executeSignaturePattern($patterns, $deciphers, $signature) { echo("\n\n\n==== Retrieved deciphers ====\n\n");