Can anyone help me by explaining how to extract urls/links from HTML File in C#
look at Html Agility Pack
HtmlDocument doc = new HtmlDocument(); doc.Load("file.htm"); foreach(HtmlNode link in doc.DocumentNode.SelectNodes("//a[@href]")) { HtmlAttribute att = link.Attributes["href"]; yourList.Add(att.Value) } doc.Save("file.htm");
2.1m questions
2.1m answers
60 comments
57.0k users