I am using HTML Agility Pack and Fizzler (So I can use CSS selectors) to scrape a results page.
I start by creating html document and then creating a list of nodes so each node is an individual result.
IEnumerable<HtmlNode> sections = document.DocumentNode.QuerySelectorAll("selector");
I now want to drill down into each of these nodes to grab the specific data I want but I am getting lost here.
I tried:
foreach (HtmlNode n in sections)
{
var phone = n.QuerySelectorAll("selector");
string myVar = phone.InnerHtml; // this doesn't work, the innerhtml property is not there.
}
Can anyone tell me how to approach this? All of the examples I have seen stop at creating the nodes list.