From fcd6a98fb036a1aeae93b2d658d7ba434270e7f1 Mon Sep 17 00:00:00 2001 From: fukusuket <41001169+fukusuket@users.noreply.github.com> Date: Sun, 9 Jul 2023 12:50:13 +0900 Subject: [PATCH] fix: [crawler] added existence check for screenshot set --- bin/lib/objects/Domains.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/lib/objects/Domains.py b/bin/lib/objects/Domains.py index 811ea6f7..ad494f3d 100755 --- a/bin/lib/objects/Domains.py +++ b/bin/lib/objects/Domains.py @@ -392,7 +392,7 @@ class Domain(AbstractObject): _write_in_zip_buffer(zf, os.path.join(hars_dir, har), f'{basename}.json') # Screenshot screenshot = self._get_external_correlation('item', '', item_id, 'screenshot') - if screenshot: + if screenshot and screenshot['screenshot']: screenshot = screenshot['screenshot'].pop()[1:] screenshot = os.path.join(screenshot[0:2], screenshot[2:4], screenshot[4:6], screenshot[6:8], screenshot[8:10], screenshot[10:12], screenshot[12:])