Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
static List<string> GetAdLinks(string url){
var mainPageAdLinks = new List<string>();
var html = GetHtml(url);
var links = html.CssSelect("a");
foreach (var link in links){
if(link.Attributes["href"].Value.Contains(".html")){
mainPageAdLinks.Add(link.Attributes["href"].Value);
}
}
return mainPageAdLinks;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment