Alright with the way below it is extracting only referring url like this
the extraction code :
foreach (HtmlNode link in hdDoc.DocumentNode.SelectNodes("//a[@href]"))
{
lsLinks.Add(link.Attributes["href"].Value.ToString());
}
The url code
<a href="Login.aspx">Login</a>
The extracted url
Login.aspx
But i want to get real link what browser parsed like
http://www.monstermmorpg.com/Login.aspx
I can do it with checking the url whether containing http and if not add the domain value but it may cause some problems at some occasions and i think not a very wise solution.
c# 4.0 , HtmlAgilityPack.1.4.0
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…