HtmlAgilityPack

可以用以下方法来提取符合条件的所有HtmlNode节点

var results = doc.DocumentNode .Descendants("div")

.Where(x=>x.Attributes.Contains("class") && x.Attributes["class"].Value.Contains("post"));

原文地址:https://www.cnblogs.com/sxmny/p/13937419.html