WARC file format library
Project description
PyWarc
Python library for WebArchive's WARC file format manipulation.
How to read a warc file:
warc = WarcReader(open("my_archive.warc"))
blk = warc.get_next_block() # read a block
print(blk.content_length) # get content length
print(blk.headers) # read headers
print(blk.read(10)) # read x bytes
print(blk.read()) # read everything
blk = warc.get_next_block() # read next block
# note that you won't be able to read the previous block anymore
# if the file is not seekable.
print(blk.content_length) # get content length
print(blk.headers) # read headers
# you can also get the content as a stream
stream = blk.get_as_stream()
print(stream.readline()) # for easier manipulation
# or you can even use a for loop to iterate on each blocks
for blk in warc:
print(blk.headers["WARC-Record-ID"])
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pywarc-0.1.0-py3-none-any.whl
(18.1 kB
view details)
File details
Details for the file pywarc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pywarc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79a753af0b978a0bdb78d1f108d506cd074fd09ebdf6a45c5e5fddd8e7b293f4
|
|
| MD5 |
5926726efb0b70d6ac1c0889ccbec3f6
|
|
| BLAKE2b-256 |
bdbbc5467ee500e0db102f2b626e00368a7b48735897052b5c49ce2ccac5b2b2
|