public override void Handle(ref Page page, ISpider spider) { if (DateTime.Now > NextTime) { CookieInjector?.Inject(spider); NextTime = DateTime.Now.AddSeconds(DueTime); } }
public override void Handle(ref Page page, ISpider spider) { if (page != null && !string.IsNullOrEmpty(page.Content) && page.Content.Contains(Content)) { CookieInjector?.Inject(spider); } throw new SpiderException($"Content downloaded contains string: {Content}."); }
public override bool Handle(Page page, ISpider spider) { if (!string.IsNullOrEmpty(page.Content) && page.Content.Contains(Content)) { CookieInjector?.Inject(spider); } throw new DownloadException($"Content downloaded contains string: {Content}."); }
public override bool Handle(Page page, ISpider spider) { if (DateTime.Now > Next) { CookieInjector?.Inject(spider); Next = DateTime.Now.AddSeconds(Interval); } return(true); }