Ok with the method below, it only extracts the referring url, like this
extraction code:
foreach (HtmlNode link in hdDoc.DocumentNode.SelectNodes("//a[@href]")) { lsLinks.Add(link.Attributes["href"].Value.ToString()); }
URL code
<a href="Login.aspx">Login</a>
Highlighted URL
Login.aspx
But I want to get a real link that the browser has analyzed, for example
http:
I can do this by checking the URL containing the http, and if you donβt add the domain value, but this can cause some problems in some cases, and I think this is not a very wise decision.
C # 4.0, HtmlAgilityPack.1.4.0
c # hyperlink extraction html-agility-pack
MonsterMMORPG
source share