在crawler4j中启动vs startNonBlocking

时间:2015-05-19 07:55:39

标签: java crawler4j

我正在使用crawler4j lib 及其依赖关系来抓取网页。有什么区别

controller.start(BasicCrawler.class, numberOfCrawlers);

VS

controller.startNonBlocking(BasicCrawler.class, numberOfCrawlers);

1 个答案:

答案 0 :(得分:0)

看看

https://github.com/yasserg/crawler4j/blob/master/src/main/java/edu/uci/ics/crawler4j/crawler/CrawlController.java

从文档中,第二个允许爬网程序线程在触发爬网请求后继续。