def replace(self, *args, **kwargs):
        """Create a new Response with the same attributes except for those
        given new values.
        """
        for x in ['url', 'status', 'headers', 'body', 'request', 'flags']:
            kwargs.setdefault(x, getattr(self, x))
        cls = kwargs.pop('cls', self.__class__)
        return cls(*args, **kwargs)
Create a new Response with the same attributes except for those
        given new values.
        
stackoverflow/venv/lib/python3.6/site-packages/scrapy/http/response/__init__.py