Skip to content

Commit

Permalink
fix: exception when missing favicon.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Feb 26, 2024
1 parent 9e302a9 commit dd7ff71
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lookyloo/lookyloo.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,8 @@ def get_potential_favicons(self, capture_uuid: str, /, all_favicons: bool=False,
fav = self._get_raw(capture_uuid, 'potential_favicons.ico', all_favicons)
if not all_favicons and for_datauri:
favicon = fav.getvalue()
if not favicon:
return '', ''
mimetype = from_string(favicon, mime=True)
return mimetype, base64.b64encode(favicon).decode()
return fav
Expand Down

0 comments on commit dd7ff71

Please sign in to comment.