Python scrapy.pipelines.images item_completed方法中[x for ok, x in results if ok]的意思
今天在DEBUG的时候又出现了一个问题,用Scrapy下载图片,需要重写ImagesPipeline类的item_completed方法。书上代码如下:defitem_completed(self,results,item,info):image_paths=[x['path']forok,xinresultsifok]ifnotimage_paths:raiseDropItem('ImageDo