How to get 1988 from the following HTML using HtmlAgilityPack:
<span class="year">Year: <strong class="">1988</strong></span>
I tried with:
.Descendants("span").Where(n => n.GetAttributeValue("class", "").Equals("year")).First().Attributes["strong"].DeEntitizeValue;
but null value is returned.
You want InnerText
of the strong element.
In your example you could do just
SelectSingleNode("//strong").InnerText
Modify the strong
selector appropriatelly for you use case.