We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey Ilya - in the spec a record can have multiple WARC-Concurrent-To fields, e.g.
WARC-Record-ID: <urn:uuid:276ff7fe-efd8-4dfa-972e-606fee81feb7> WARC-Concurrent-To: <urn:uuid:f22d1d8b-fcf6-4836-9959-7e91c8a2380d> WARC-Concurrent-To: <urn:uuid:57b684e2-e813-437f-a99f-bf8c31cdb258>
As an exception to the general rule, several WARC-Concurrent-To fields may be repeated within the same WARC record.
https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/#warc-concurrent-to
However the parser is only allowing access to one of them. Is it possible to get record.warcHeader('WARC-Concurrent-To') to return an array of values?
record.warcHeader('WARC-Concurrent-To')
The text was updated successfully, but these errors were encountered:
As a workaround I'm using:
class MultiValueMap extends Map { set(key, value) { let finalValue = value if (key === 'WARC-Concurrent-To') { const prev = this.get(key) || [] finalValue = [...prev, value] } super.set(key, finalValue) } } const parser = new WARCParser(...) parser._headersClass = MultiValueMap
Sorry, something went wrong.
No branches or pull requests
Hey Ilya - in the spec a record can have multiple WARC-Concurrent-To fields, e.g.
https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/#warc-concurrent-to
However the parser is only allowing access to one of them. Is it possible to get
record.warcHeader('WARC-Concurrent-To')
to return an array of values?The text was updated successfully, but these errors were encountered: