public NewsFileExt GetFullNewsFileInfo(NewsFileExt x)
        {
            var body = String.Empty;

            //var web = new HtmlWeb();
            //web.AutoDetectEncoding = true;
            //var doc = web.Load(x.Link);
            var html = WebHelper.GetHtmlDocument(x.Link, 15000);
            var doc = new HtmlDocument();
            doc.LoadHtml(html);

            body = GetBody(doc);
            x.Categories = GetCategories(doc);

            x.Content = body;
            return x;
        }
Ejemplo n.º 2
0
 private Boolean IsElementok(NewsFileExt x)
 {
     if (x.Categories != null && x.Categories.Count() > 0 && x.Content != "Error while fetching" && x.ParseOk && x.Content != "")
     {
         return true;
     }
     return false;
 }