mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
python 3.5 version, mostly
This commit is contained in:
parent
1476bfec8c
commit
e744075913
@ -418,8 +418,8 @@ class BatchTroughLoader(warcprox.BaseBatchPostfetchProcessor):
|
||||
if (recorded_url.response_recorder
|
||||
and recorded_url.payload_digest
|
||||
and self.trough_dedup_db.should_dedup(recorded_url)
|
||||
and f'{recorded_url.payload_digest}{recorded_url.url}' not in hash_plus_urls):
|
||||
hash_plus_urls.add(f'{recorded_url.payload_digest}{recorded_url.url}')
|
||||
and '{}{}'.format(recorded_url.payload_digest, recorded_url.url) not in hash_plus_urls):
|
||||
hash_plus_urls.add('{}{}'.format(recorded_url.payload_digest, recorded_url.url))
|
||||
if (recorded_url.warcprox_meta
|
||||
and 'dedup-buckets' in recorded_url.warcprox_meta):
|
||||
for bucket, bucket_mode in recorded_url.warcprox_meta["dedup-buckets"].items():
|
||||
@ -427,9 +427,9 @@ class BatchTroughLoader(warcprox.BaseBatchPostfetchProcessor):
|
||||
else:
|
||||
buckets['__unspecified__'].append(recorded_url)
|
||||
else:
|
||||
if f'{recorded_url.payload_digest}{recorded_url.url}' in hash_plus_urls:
|
||||
if recorded_url.payload_digest and '{}{}'.format(recorded_url.payload_digest, recorded_url.url) in hash_plus_urls:
|
||||
self.logger.debug(
|
||||
f'discarding duplicate {recorded_url.payload_digest} {recorded_url.url}')
|
||||
'discarding duplicate {} {}'.format(recorded_url.payload_digest, recorded_url.url))
|
||||
discards.append(
|
||||
warcprox.digest_str(
|
||||
recorded_url.payload_digest, self.options.base32)
|
||||
|
Loading…
x
Reference in New Issue
Block a user