Exemplo n.º 1
0
 def __init__(self,
              version=VERSION,
              headers=None,
              content=None,
              errors=None):
     ArchiveRecord.__init__(self, headers, content, errors)
     self.version = version
Exemplo n.º 2
0
    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
Exemplo n.º 3
0
    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
Exemplo n.º 4
0
 def __init__(self, headers=None, content=None, errors=None):
     ArchiveRecord.__init__(self, headers, content, errors)
Exemplo n.º 5
0
 def __init__(self, version=VERSION, headers=None, content=None,
              errors=None):
     ArchiveRecord.__init__(self, headers, content, errors)
     self.version = version
Exemplo n.º 6
0
 def __init__(self, headers=None, content=None, errors=None):
     ArchiveRecord.__init__(self, headers, content, errors)