Skip to content

Commit

Permalink
fix: Avoid passing a referer to None, causing URLscan to fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Oct 28, 2022
1 parent a48c6e0 commit 8caa45a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lookyloo/lookyloo.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def get_info(self, capture_uuid: str, /) -> Dict[str, Any]:
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]:
Expand Down

0 comments on commit 8caa45a

Please sign in to comment.