This repository was archived by the owner on Sep 28, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +2
-8
lines changed
Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ private static void DownloadVideo(IEnumerable<VideoInfo> videoInfos)
8888 private static void Main ( )
8989 {
9090 // Our test youtube link
91- const string link = "http ://www.youtube.com/watch?v=O3UBOOZw-FE " ;
91+ const string link = "https ://www.youtube.com/watch?v=YQHsXMglC9A " ;
9292
9393 /*
9494 * Get the available video formats.
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public static string DecipherWithVersion(string cipher, string cipherVersion)
2222 funcName = "\\ " + funcName ; //Due To Dollar Sign Introduction, Need To Escape
2323 }
2424
25- string funcPattern = @funcName + @"=function\(\w+\)\{.*?\}, " ; //Escape funcName string
25+ string funcPattern = @"(?!h\.)" + @ funcName + @"=function\(\w+\)\{.*?\}" ; //Escape funcName string
2626 var funcBody = Regex . Match ( js , funcPattern , RegexOptions . Singleline ) . Value ; //Entire sig function
2727 var lines = funcBody . Split ( ';' ) ; //Each line in sig function
2828
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ namespace YoutubeExtractor
1313 public static class DownloadUrlResolver
1414 {
1515 private const string RateBypassFlag = "ratebypass" ;
16- private const int CorrectSignatureLength = 81 ;
1716 private const string SignatureQuery = "signature" ;
1817
1918 /// <summary>
@@ -226,11 +225,6 @@ private static string GetAdaptiveStreamMap(JObject json)
226225
227226 private static string GetDecipheredSignature ( string htmlPlayerVersion , string signature )
228227 {
229- if ( signature . Length == CorrectSignatureLength )
230- {
231- return signature ;
232- }
233-
234228 return Decipherer . DecipherWithVersion ( signature , htmlPlayerVersion ) ;
235229 }
236230
You can’t perform that action at this time.
0 commit comments