Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
orignal file commited
  • Loading branch information
MarwanDesigner committed Jul 26, 2017
1 parent ad458c8 commit b5ed1aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .htaccess
@@ -1,3 +1,3 @@
# intercept request for getvideo
RewriteEngine On
RewriteRule ^.*\.mp4$ getvideo.php
RewriteRule ^.*\.mp4$ getvideo.php
6 changes: 5 additions & 1 deletion src/Format.php
Expand Up @@ -105,7 +105,11 @@ private function parseUrl()
{
// TODO: Remove signature decipher from Format
$playerID = SignatureDecipher::downloadPlayerScript($this->getVideoId());
$signature = '&ratebypass=yes&signature='.SignatureDecipher::decipherSignature($playerID, $this->raw_data['s']);
if(strpos($this->raw_data['url'], 'ratebypass=')===false)
{
$this->raw_data['url'] .= '&ratebypass=yes';
}
$signature = '&signature='.SignatureDecipher::decipherSignature($playerID, $this->raw_data['s']);
}

$this->data['url'] = $this->raw_data['url'].$signature;
Expand Down
45 changes: 0 additions & 45 deletions src/VideoInfo.php
Expand Up @@ -141,23 +141,6 @@ public static function createFromStringWithConfig($string, Config $config)
return new self($video_info, $config);
}

/**
* Creates a VideoInfo from string
*
* @deprecated since version 0.2, to be removed in 0.3. Use VideoInfo::createFromStringWithConfig() instead
*
* @param string $video_info
* @return VideoInfo
*/
public static function createFromString($string)
{
@trigger_error(__METHOD__ . ' is deprecated since version 0.2, to be removed in 0.3. Use VideoInfo::createFromStringWithConfig() instead', E_USER_DEPRECATED);

parse_str($string, $video_info);

return new self($video_info);
}

/**
* @var Format[]
*/
Expand Down Expand Up @@ -340,32 +323,4 @@ public function getAdaptiveFormats()
{
return $this->adaptive_formats;
}

/**
* Get the url_encoded_fmt_stream_map
*
* @deprecated since version 0.2, to be removed in 0.3. Use VideoInfo::getFormats() instead
*
* @return string
*/
public function getStreamMapString()
{
@trigger_error(__METHOD__ . ' is deprecated since version 0.2, to be removed in 0.3. Use VideoInfo::getFormats() instead', E_USER_DEPRECATED);

return $this->data['url_encoded_fmt_stream_map'];
}

/**
* Get the adaptive_fmts
*
* @deprecated since version 0.2, to be removed in 0.3. Use VideoInfo::getAdaptiveFormats() instead
*
* @return string
*/
public function getAdaptiveFormatsString()
{
@trigger_error(__METHOD__ . ' is deprecated since version 0.2, to be removed in 0.3. Use VideoInfo::getAdaptiveFormats() instead', E_USER_DEPRECATED);

return $this->data['adaptive_fmts'];
}
}

0 comments on commit b5ed1aa

Please sign in to comment.