public void PROCESSOR(Site link) { if (!hr.GetPage(link.Url)) { throw new ProcessorException(ProcessorExceptionType.RESTORE_AS_NEW, "Could not get site: " + link.Url); } get_links(1, link.__Queue.Name); }
override public void PROCESSOR(BotCycle bc) { int _MaxDownloadedFileLength = Bot.Properties.Web.Default.MaxDownloadedFileLength; if (!Download) { Bot.Properties.Web.Default.MaxDownloadedFileLength = 0; } HttpRoutine hr = new HttpRoutine(); bool rc = hr.GetPage(Url); Bot.Properties.Web.Default.MaxDownloadedFileLength = _MaxDownloadedFileLength; if (!rc) { if (hr.Status == WebRoutineStatus.UNACCEPTABLE_CONTENT_TYPE) { return; } if (hr.HWResponse.StatusCode == System.Net.HttpStatusCode.NotFound) { FileWriter.This.WriteLine(ParentLink.Url, Url); } //site2boken_urls[item.Site.Url] = site2boken_urls[item.Site.Url] + "\n" + item.Url; else { throw new ProcessorException(ProcessorExceptionType.RESTORE_AS_NEW, "Could not get: " + Url); } return; } if (Download) { get_links(Depth + 1, hr, bc); } }