def __init__(self, version=VERSION, headers=None, content=None, errors=None): ArchiveRecord.__init__(self, headers, content, errors) self.version = version
def __init__(self, version=VERSION, headers=None, content=None, errors=None, content_file=None): """ WarcRecord constructor. Either content or content_file must be provided, but not both. If content, which is a tuple (content_type, content_buffer), is provided, when writing the warc record, any Content-Type and Content-Length that appear in the supplied headers are ignored, and the values content[0] and len(content[1]), respectively, are used. When reading, the caller can stream content_file or use content, which is lazily filled using content_file, and after which content_file is unavailable. """ ArchiveRecord.__init__(self, headers, content, errors) self.version = version self.content_file = content_file
def __init__(self, headers=None, content=None, errors=None): ArchiveRecord.__init__(self, headers, content, errors)