/// <summary>
 /// Regex must have a named capture group called AnimeName and Url
 /// </summary>
 /// <param name="url"></param>
 /// <param name="regex"></param>
 public HtmlRegexAnimeStreamInfoSource(string url, Regex animeRegex, StreamingService service, HtmlRegexContext animeNameContext, HtmlRegexContext urlContext)
 {
     Url = url;
     AnimeRegex = animeRegex;
     Service = service;
     AnimeNameContext = animeNameContext;
     UrlContext = urlContext;
 }
 /// <summary>
 /// Regex must have named capture groups called AnimeName and Url
 /// </summary>
 /// <param name="url"></param>
 /// <param name="regex"></param>
 public HtmlRegexAnimeStreamInfoSource(string url, Regex animeRegex, string html, StreamingService service, HtmlRegexContext animeNameContext, HtmlRegexContext urlContext)
 {
     Url              = url;
     AnimeRegex       = animeRegex;
     Html             = html;
     Service          = service;
     AnimeNameContext = animeNameContext;
     UrlContext       = urlContext;
 }
        private string DecodeString(string str, HtmlRegexContext context)
        {
            switch (context)
            {
            case HtmlRegexContext.Body:
                return(Utils.DecodeHtmlBody(str));

            case HtmlRegexContext.Attribute:
                return(Utils.DecodeHtmlAttribute(str));

            default:
                return(str);
            }
        }
 private string DecodeString(string str, HtmlRegexContext context)
 {
     switch (context)
     {
         case HtmlRegexContext.Body:
             return WebUtility.HtmlDecode(str);
         case HtmlRegexContext.Attribute:
             return str.Replace("&quot;", "\"").Replace("&apos;", "'").Replace("&lt;", "<").Replace("&gt;", ">").Replace("&amp;", "&");
         default:
             return str;
     }
 }