From 8caa45a74d17468121381f100abcff0f469b71d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Sat, 29 Oct 2022 01:01:23 +0200 Subject: [PATCH] fix: Avoid passing a referer to None, causing URLscan to fail. --- lookyloo/lookyloo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lookyloo/lookyloo.py b/lookyloo/lookyloo.py index 6deb20c3..58ae3755 100644 --- a/lookyloo/lookyloo.py +++ b/lookyloo/lookyloo.py @@ -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]: