Update your browser | Facebook message

Topics: Developer Forum, User Forum
Nov 16, 2013 at 4:17 PM
Hi,

I am new to HtmlAgilityPack, and was told to load the meta data by using HtmlAgilityPack, this works perfect. But the issue I have to face, is that when loading the major websites such as Google and Facebook, their description isn't shown and their title is different. For Facebook it is Update your browser | Facebook.

How to prevent this? I mean what type of browser is used to load the data? I have recently downloaded the pack from NuGet gallery, so which means this is latest. And the code I am using is ow to prevent this? I mean what type of browser is used to load the data? I have recently downloaded the pack from NuGet gallery, so which means this is latest. And the code I am using is
@using HtmlAgilityPack;
@{
    Layout = "~/_SiteLayout.cshtml";
    var Title = "";
    var Description = "";
    using(var client = new WebClient()){
        var html = client.DownloadString("http://www.facebook.com");
        var doc = new HtmlDocument();
        doc.LoadHtml(html);
        var title = doc.DocumentNode.Descendants("title").FirstOrDefault();
        if(title != null){
            Title = title.InnerText;
        }
        var description = doc.DocumentNode.Descendants("meta")
                                          .Where(n => n.GetAttributeValue("name", String.Empty)
                                          .Contains("description")).FirstOrDefault();
        if(description != null){
            Description = description.GetAttributeValue("content", string.Empty);
        }
    }
}
Any guidance?