1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

Added some print statements for debugging.

This commit is contained in:
Andrew Jackson 2019-02-14 14:42:28 +00:00 committed by John Berlin
parent 465195f203
commit 8bf2f9debb
No known key found for this signature in database
GPG Key ID: 6EF5E4B442011B02

View File

@ -100,16 +100,21 @@ class AccessChecker(object):
last_url = None
for cdx in cdx_iter:
print("Looking at",cdx)
url = cdx.get('url')
print(url)
# if no url, possible idx or other object, don't apply any checks and pass through
if not url:
yield cdx
continue
rule = self.find_access_rule(url, cdx.get('timestamp'), cdx.get('urlkey'))
print(rule)
access = rule.get('access', 'exclude')
print(access)
if access == 'exclude':
continue
print("Yielding...")
cdx['access'] = access
yield cdx