日期:2014-05-17 浏览次数:20495 次
void crawler_OnCrawlerThreadEnd(object sender, Nipusa.Crawler.EventArguments.CrawlerThreadEndEventArgs args) { //throw new NotImplementedException(); } void crawler_OnError(object sender, Nipusa.Crawler.EventArguments.CrawlerErrorEventArgs args) { //throw new NotImplementedException(); } void crawler_OnFindNewUri(object sender, Nipusa.Crawler.EventArguments.CrawlerFindNewUriEventArgs args) { // throw new NotImplementedException(); } void crawler_OnUriFetchComplete(object sender, Nipusa.Crawler.EventArguments.CrawlerUriFetchCompleteEventArgs args) { if (plugins_list.ContainsKey(args.CrawlerObject.CrawlerName)) { List<PluginBase> plugins = plugins_list[args.CrawlerObject.CrawlerName]; foreach (PluginBase pb in plugins) { pb.OnUriFetchComplete(sender, args); } } } void crawler_OnUriBeginRequest(object sender, Nipusa.Crawler.EventArguments.CrawlerUriBeginRequestEventArgs args) { ThreadMessage((sender as Nipusa.Crawler.NipusaCrawler).CrawlerName, args.ThreadName+":"+args.RequestUri.ToString()); if (plugins_list.ContainsKey(args.CrawlerObject.CrawlerName)) { List<PluginBase> plugins = plugins_list[args.CrawlerObject.CrawlerName]; foreach (PluginBase pb in plugins) { pb.OnUriBeginRequest(sender, args); } } }