def get_media_requests(self, item, info): for image_url in item['hupu_image_url']:
image_urls = 'http:' + image_url yield Request(image_urls)
def item_completed(self, results, item, info):
image_paths = [x['path'] for ok, x in results if ok] if not image_paths: raise DropItem('图片未下载好 %s' % image_paths)