我在Python3中启动了一个子进程:
# This will raise an exception if scrapy fails
# which is _probably_ a good idea in most scenarios
run(["scrapy", "crawl", "googlebook", "-a", "arg=" + json.dumps(urls)],check=True)
该进程逐页查询书籍信息,但在请求中间(可能是50页以上),响应内容为null。因此,我想退出当前子进程并退出下一页请求。然后重新启动新的子进程以请求其他关键字。如何在草率的pipline流程中退出当前子流程?