Open toolboc opened 7 years ago
or remove the if and make it a one-liner with return matches.Count > 0 ? matches[0].Groups[1].Value : string.Empty;
private static string FindMatch(string text, string regexp)
{
Regex rgx = new Regex(regexp);
var matches = rgx.Matches(text);
if (matches.Count > 0)
return matches[0].Groups[1].Value;
else
return string.Empty;
}
*feedback addressed in https://github.com/flagbug/YoutubeExtractor/pull/245/commits/75564dd470c14630cca0d5351826317b06010616
@jphellemons , please let me know if you see anything else =)
Various optimizations Decipherer follows strategy employed by https://github.com/gantt/downloadyoutube *Resolves #242
This Decipherer is based on https://github.com/gantt/downloadyoutube which was one of the very first MP4 download scripts that took on encrypted video signatures. It is also one of the fastest to update during breaking changes. If we shift to the strategy employed by @gantt , we can benefit from these properties if/when things break again.