mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-10-11 12:58:39 -04:00
and decode()
This commit is contained in:
parent
a5ee78e662
commit
7edb0f11b0
1 changed files with 2 additions and 2 deletions
|
@ -284,8 +284,8 @@ class Site(doublethink.Document, ElapsedMixIn):
|
||||||
del temp_warcprox_meta['blocks']
|
del temp_warcprox_meta['blocks']
|
||||||
# str-ify blocks
|
# str-ify blocks
|
||||||
blocks_str = json.dumps(self.warcprox_meta['blocks'], separators=(',', ':'))
|
blocks_str = json.dumps(self.warcprox_meta['blocks'], separators=(',', ':'))
|
||||||
# encode(), compress, b64encode
|
# encode(), compress, b64encode, decode()
|
||||||
temp_warcprox_meta['compressed_blocks'] = base64.b64encode(zlib.compress(blocks_str.encode()))
|
temp_warcprox_meta['compressed_blocks'] = base64.b64encode(zlib.compress(blocks_str.encode())).decode()
|
||||||
if page is not None:
|
if page is not None:
|
||||||
temp_warcprox_meta["metadata"]["hop_path"] = page.hop_path
|
temp_warcprox_meta["metadata"]["hop_path"] = page.hop_path
|
||||||
temp_warcprox_meta["metadata"]["brozzled_url"] = page.url
|
temp_warcprox_meta["metadata"]["brozzled_url"] = page.url
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue