webmagic icon indicating copy to clipboard operation
webmagic copied to clipboard

如何让多个spider顺序执行

Open getideas opened this issue 2 years ago • 1 comments

如何让多个spider顺序执行,比如spider1执行完毕后,就开始执行spider2,要如何操作。

getideas avatar May 04 '23 16:05 getideas

将多个爬虫需要的参数封装放在list中,用foreach遍历,在循环内调用spider的启动方法,这样一次爬虫结束以后就会进入下一个循环执行第二个爬虫

18547601391 avatar Jan 04 '24 02:01 18547601391