diff --git a/YoutubeExtractor/YoutubeExtractor/Decipherer.cs b/YoutubeExtractor/YoutubeExtractor/Decipherer.cs index e71e09f..bd50851 100644 --- a/YoutubeExtractor/YoutubeExtractor/Decipherer.cs +++ b/YoutubeExtractor/YoutubeExtractor/Decipherer.cs @@ -13,7 +13,7 @@ public static string DecipherWithVersion(string cipher, string cipherVersion) string js = HttpHelper.DownloadString(jsUrl); //Find "C" in this: var A = B.sig||C (B.s) - string functNamePattern = @"\.sig\s*\|\|(\w+)\("; + string functNamePattern = @"\.sig\s*\|\|(\w+|$)\("; var funcName = Regex.Match(js, functNamePattern).Groups[1].Value; string funcBodyPattern = @"(?{([^{}]| ?(brace))*})"; //Match nested angle braces string funcPattern = string.Format(@"{0}\(\w+\){1}", funcName, funcBodyPattern);