fix: Avoid passing a referer to None, causing URLscan to fail.

pull/544/head
Raphaël Vinot 2022-10-29 01:01:23 +02:00
parent a48c6e0bd6
commit 8caa45a74d
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ class Lookyloo():
ct = self.get_crawled_tree(capture_uuid)
to_return = {'url': ct.root_url, 'title': ct.root_hartree.har.initial_title,
'capture_time': ct.start_time.isoformat(), 'user_agent': ct.user_agent,
'referer': ct.referer}
'referer': ct.referer if ct.referer else ''}
return to_return
def get_meta(self, capture_uuid: str, /) -> Dict[str, str]: