Ejemplo n.º 1
0
 public override void Eat(HtmlAgilityPack.HtmlDocument html, string url, string path, object userData)
 {
     html.Save(path, Encoding.UTF8);
     ExportAss(path);
 }
Ejemplo n.º 2
0
        private static string GetDocContent(HtmlAgilityPack.HtmlDocument doc)
        {
            string rtv = null;
            using (MemoryStream mem = new MemoryStream())
            using (StreamWriter sw = new StreamWriter(mem))
            {
                doc.Save(sw);

                mem.Seek(0, SeekOrigin.Begin);
                using (StreamReader sr = new StreamReader(mem))
                {
                    rtv = sr.ReadToEnd();
                }
            }
            return rtv;
        }