YoutubeExtractor icon indicating copy to clipboard operation
YoutubeExtractor copied to clipboard

Update Decipherer

Open toolboc opened this issue 8 years ago • 3 comments

*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.

toolboc avatar Apr 03 '17 19:04 toolboc

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;
}

jphellemons avatar Mar 16 '18 10:03 jphellemons

#296 #301

jphellemons avatar Mar 16 '18 10:03 jphellemons

*feedback addressed in https://github.com/flagbug/YoutubeExtractor/pull/245/commits/75564dd470c14630cca0d5351826317b06010616

@jphellemons , please let me know if you see anything else =)

toolboc avatar Mar 21 '18 21:03 toolboc