How to extract description if meta tag does't exist?
See the question and my original answer on StackOverflowYou could use XPATH, something like this, wrapped in a method:
static string GetMetaDescription(HtmlDocument doc)
{
// get a META element recursively in the document
// which has a NAME attribute equal to 'description'
// and a non empty CONTENT attribute.
HtmlNode node = doc.DocumentNode.SelectSingleNode("//meta[@name='description' and @content]");
if (node == null)
return null;
// get the value of the CONTENT attribute
return node.GetAttributeValue("content", null);
}