def copy(self, new_grab=None):

        if new_grab is not None:
            obj = self.__class__(self.grab)  # Response()
        else:
            obj = self.__class__(new_grab)

        copy_keys = ('status', 'code', 'head', 'body', 'total_time',
                     'connect_time', 'name_lookup_time',
                     'url', 'charset', '_unicode_body')
        for key in copy_keys:
            setattr(obj, key, getattr(self, key))

        obj.headers = copy(self.headers)
        # TODO: Maybe, deepcopy?
        obj.cookies = copy(self.cookies)

        return obj
Clone the Response object.
dataset/ETHPy150Open lorien/grab/grab/document.py/Document.copy