1. 程式人生 > >python中還沒理解的點

python中還沒理解的點

1.在scrapy爬蟲中的一句程式碼

class BmwImagePipeline(ImagesPipeline):
    def get_media_requests(self, item, info):
        request_objs = super(BmwImagePipeline, self).get_media_requests(item, info)
        for request_obj in request_objs:
            request_obj.item = item  # >>>> request_obj繫結item?
        return request_objs