private void ExtractLinksFromHtml(string html, IFilter filter) { foreach (string match in filter.FilterHTML(html)) { string href = match; if (href.StartsWith("//")) { continue; } if (href.StartsWith("/")) { href = formatSubDomainToFullAddreess(href, startingAddress); } if (href.StartsWith(startingAddress) && !visitedSites.Contains(href) && !sitesToVisit.Contains(href) && checkIfURLIsAllowedByFilters(href)) { sitesToVisit.Push(href); } } }