3. basc_warc.RecordHeader - WARC Record Header

This class is a header for a basc_warc.Record object.

3.1. Fields

The following methods let you set standard WARC fields.

class basc_warc.RecordHeader(fields={})

A header for a WARC record.

Parameters:fields (dict) – Fields to create this header with.
RecordHeader.set_field(name, value)

Set field to the given value.

Parameters:
  • name (string) – Name of the field.
  • value (string or int) – Value of the field.

3.2. Simple field access

These are convenient ways to access certain fields.

RecordHeader.record_id

ID of this Record, should be unique in the WARC.

RecordHeader.date

Datetime the data capture that created this Record started.