Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个需要抓取的网址列表。是否可以仅抓取网页列表而不进行深度抓取。如果我将 url 添加为种子,它会以完整的深度抓取整个网站。
要仅抓取您作为种子添加的页面,请将 MaxDepthOfCrawling 设置为 0。
CrawlConfig config = new CrawlConfig(); config.setMaxDepthOfCrawling(0); PageFetcher pageFetcher = new PageFetcher(config);