calling controller(crawler4j-3.5) inside loop

前端 未结 1 1556
南笙
南笙 2021-01-15 23:58

Hi I am calling controller inside for-loop, because I am having more than 100 url, so I am having all in list and I will iterate and crawl

相关标签:
1条回答
  • 2021-01-16 00:25

    Try:

    for(String url : urls) {
        controller.addSeed(url);
    }
    

    and override shouldVisit(WebUrl) so that it can't leave the domains.

    0 讨论(0)
提交回复
热议问题