private void HandleLinks(WebPageState state) { Match m = RegExUtil.GetMatchRegEx(RegularExpression.UrlExtractor, state.Content); while (m.Success) { ManualProcessorLinksCounter++; m = m.NextMatch( ); } }
private void HandleLinks(WebPageState state) { string html = state.Content; Match m = RegExUtil.GetMatchRegEx(RegularExpression.UrlExtractor, html); while (m.Success) { m_spider.AddWebPage(state.Uri, m.Groups["url"].ToString( )); m = m.NextMatch( ); } }
private void GraphicsLinkHandler(WebPageState state) { Match m = RegExUtil.GetMatchRegEx(RegularExpression.SrcExtractor, state.content_); string image; while (m.Success) { m = m.NextMatch(); image = m.Groups[1].ToString(); statusBar.Text = "Image: " + image; Application.DoEvents(); DownloadImage(image); } }
public void HandleLinks(WebPageState state) { if (state.processInstructions_.IndexOf("Handle Links") != -1) { int counter = 0; Match m = RegExUtil.GetMatchRegEx(RegularExpression.UrlExtractor, state.content_); while (m.Success) { if (AddWebPage(state.uri_, m.Groups["url"].ToString())) { counter++; } m = m.NextMatch(); } } }
public void HandleLinks(WebPageState state) { if (state.ProcessInstructions.IndexOf("Handle Links") != -1) { int counter = 0; Match m = RegExUtil.GetMatchRegEx(RegularExpression.UrlExtractor, state.Content); while (m.Success) { if (AddWebPage(state.Uri, m.Groups["url"].ToString( ))) { counter++; } m = m.NextMatch( ); } Console.WriteLine(" : {0} new links were added", counter); } }