Вам должно быть довольно просто получить то, что вам нужно с HtmlAgilityPack. Предполагая, что ваш документ загружен в объект HtmlDocument
с именем doc
:
HtmlNodeCollection collection = doc.DocumentNode.SelectNodes("//a[@href]");
foreach (HtmlNode node in collection)
{
// Do what you want with the href value in here. As an example, this just
// just prints the value to the console.
Console.WriteLine(node.GetAttributeValue("href", "default"));
}