webmagic icon indicating copy to clipboard operation
webmagic copied to clipboard

使用Spider.get()获取不到ResultItems的数据

Open danchelLee opened this issue 5 years ago • 1 comments

我想通过Spider.get()获取page.putField()的数据,但实际运行发现spider.get()返回null,请问如何获取呢? Spider spider = Spider.create(saleOrderManagementProcessor); spider.addUrl(url); spider.addPipeline(new GigaSaleOrderManagementPipeline(); spider.run(); ResultItems resultItems = spider.get(url);

danchelLee avatar Jan 08 '21 09:01 danchelLee

你看这个例子: us.codecraft.webmagic.processor.example.BaiduBaikePageProcessor.main(String[]),我运行了一下,没有发现问题。

sutra avatar Jan 08 '21 09:01 sutra