I have pages that use images as links, and I am trying to get the link as well as the images url.
So if it was: <a href="LINK"><img src="IMAGEURL"></a>
I need to collect both the link and the image url.
This is what I have, but I don't know how to go about collecting the image url from inside the existing foreach
Is there a way of dong this?
HtmlWeb hw = new HtmlWeb();
HtmlAgilityPack.HtmlDocument doc = hw.Load(url);
foreach (HtmlNode link in doc.DocumentNode.SelectNodes("//a[@href]"))
HtmlAttribute att = link.Attributes["href"];