3

Is it possible to pass params to WebCrawler ? For example I want to pass new rule for WebCrawler.shouldVisit(WebURL url) method in runtime or set some field in my WebCrawler. Is it possible?

Patrick
  • 4,532
  • 2
  • 26
  • 32
chinchilla
  • 93
  • 5
  • I found the answer. You can use method CrawlController.setCustomData(Object customData) to store data and than you can fetch your data from crawler by using WebCrawler.getMyController().getCustomData() – chinchilla Jul 04 '14 at 08:52
  • Great! Add it as an answer yourself, and after a while (I believe 2 days) you will be able to mark it as the correct answer. See the help center - this is a perfectly normal thing to do. – Erwin Bolwidt Jul 04 '14 at 08:55
  • I've tried but I can't do this during first 8 hours, I will move this to answer asap. – chinchilla Jul 04 '14 at 08:57

1 Answers1

5

I found the answer. You can use method CrawlController.setCustomData(Object customData) to store data and than you can fetch your data from crawler by using WebCrawler.getMyController().getCustomData().

chinchilla
  • 93
  • 5