Added check to make sure screenshot exists before adding it to table in html report.

This commit is contained in:
NotoriousRebel 2020-07-05 11:15:27 -04:00
parent 2f5213db38
commit 086d18c216

View file

@ -308,8 +308,9 @@ async def generatescreenshots(tups: List):
date = tup[0]
domain = tup[1]
path = tup[2].replace('\\', '\\\\')
data = f'{{date:"{date}", domain:"{domain}", icon:"{path}"}},'
base += data
if len(path) > 0:
data = f'{{date:"{date}", domain:"{domain}", icon:"{path}"}},'
base += data
base += '];'
return html.replace('xxxxxxxxx', base)
except Exception as e: