private WebPageParserResult FindTimetablesLinks(string html) { MatchCollection matches = Regex.Matches(html, TimetableUriPattern); var result = new WebPageParserResult { Count = matches.Count }; var hyperlinks = new List <HyperlinkInfo>(); foreach (Match match in matches) { string link = match.Groups[GroupLink].Value; string title = match.Groups[GroupNumber].Value; hyperlinks.Add(new HyperlinkInfo { Link = link, Title = title }); } result.Links = hyperlinks; return(result); }
public WebPageParserResult GetLinksOfTimetables() { string html = GetHtmlOfTimetable(); WebPageParserResult result = FindTimetablesLinks(html); return(result); }