chinchilla
chinchilla

Reputation: 93

Params for WebCrawler in crawler4j

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?

Upvotes: 3

Views: 374

Answers (1)

chinchilla
chinchilla

Reputation: 93

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().

Upvotes: 5

Related Questions