diff --git a/hosts/download/youtube_com.php b/hosts/download/youtube_com.php index 3336eced..66713c58 100644 --- a/hosts/download/youtube_com.php +++ b/hosts/download/youtube_com.php @@ -236,7 +236,8 @@ private function getCipher() { //if (($spos = strpos($this->playerJs, '.sig||')) === false) $this->decError('Not found (".sig||")'); //if (($cut1 = cut_str(substr($this->playerJs, $spos), '{', '}')) == false) $this->decError('Cannot get inner content of "if(X.sig||X.s)"'); $v = '[\$_A-Za-z][\$\w]*'; - if (!preg_match("@(?:\.sig\|\||\.set\(\"signature\",|\|\"signature\",|$v\.sp,)(?:\(0,$v(?:\.$v)*\)\()?($v)\((?:\(0,$v(?:\.$v)*\)\()?$v\.s\)@", $this->playerJs, $fn)) $this->decError('Cannot get decoder function name'); + $v3 = '[\$_A-Za-z][\$\w]{3,}'; + if (!preg_match("@(?:\.sig\|\||\.set\(\"signature\",|\|\"signature\",|$v\.sp,)(?:\(0,$v(?:\.$v)*\)\(|$v3\()?($v)\((?:\(0,$v(?:\.$v)*\)\(|$v3\()?$v\.s\)@", $this->playerJs, $fn)) $this->decError('Cannot get decoder function name'); $fn = preg_quote($fn[1], '@'); if (!preg_match("@(?:function\s+$fn\s*\(|var\s+$fn\s*=\s*function\s*\(|(?<=(?:{|,|;))\s*$fn\s*=\s*function\s*\()@", $this->playerJs, $fpos, PREG_OFFSET_CAPTURE)) $this->decError('Cannot find decoder function'); $fpos = $fpos[0][1]; @@ -354,4 +355,4 @@ private function QSelector() { // [30-8-2016] Fixed slow speed while downloading DASH streams. - Th3-822 // [30-4-2017] Fixed signature decoding functions. - Th3-822 // [25-1-2018] Fixed get_video_info. - Th3-822 -// [09-11-2018] Fixed signature decoding functions. - Th3-822 \ No newline at end of file +// [03-2-2019] Fixed signature decoding functions. - Th3-822 \ No newline at end of file